Package com.bandwidth.exceptions
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.bandwidth.exceptions.ApiException
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ApiErrorResponseException
,GenericClientException
,PathClientException
public class ApiException
extends java.lang.Exception
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ApiException(java.lang.String reason)
Initialization constructorApiException(java.lang.String reason, HttpContext context)
Initialization constructor -
Method Summary
Modifier and Type Method Description HttpContext
getHttpContext()
The HTTP response body from the API requestint
getResponseCode()
The HTTP response code from the API request
-
Constructor Details
-
ApiException
public ApiException(java.lang.String reason)Initialization constructor- Parameters:
reason
- The reason for throwing exception
-
ApiException
Initialization constructor- Parameters:
reason
- The reason for throwing exceptioncontext
- The http context of the API exception
-
-
Method Details
-
getResponseCode
public int getResponseCode()The HTTP response code from the API request -
getHttpContext
The HTTP response body from the API request
-