Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.95 KB | None | 0 0
  1.  
  2.             Dim client As New GOSocketClient(oHeaderConfig)
  3.             With (client)
  4.                 oResponseApi = .PostRestClient(Of DocumentToAuthority, ProcessResult)(sUrl, oRequestBody)
  5.             End With
  6.  
  7.             If Not IsNothing(oResponseApi.ResponseException) Then
  8.                 Select Case True
  9.                     Case TypeOf oResponseApi.ResponseException Is WebException
  10.                         If CType(oResponseApi.ResponseException, WebException).Status = WebExceptionStatus.ConnectFailure Then
  11.                             Throw New UserException("FACTURACION ELECTRONICA NO DISPONIBLE." & vbCrLf & "REGISTRE DOCUMENTO EN CONTINGENCIA")
  12.                         ElseIf CType(oResponseApi.ResponseException, WebException).Status = WebExceptionStatus.Timeout Then
  13.                             Throw New TimeoutException("ENVIO DE DOCUMENTO DEMORO MAS DE LO ESPERADO, INTENTE NUEVAMENTE.")
  14.                         Else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement