Package com.twilio.exception
Class ApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.twilio.exception.TwilioException
-
- com.twilio.exception.ApiException
-
- All Implemented Interfaces:
Serializable
public class ApiException extends TwilioException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApiException(RestException restException)Create a new API Exception.ApiException(String message)Create a new API Exception.ApiException(String message, Integer code, String moreInfo, Integer status, Throwable cause)Create a new API Exception.ApiException(String message, Throwable cause)Create a new API Exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetCode()Map<String,Object>getDetails()StringgetMoreInfo()IntegergetStatusCode()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ApiException
public ApiException(String message)
Create a new API Exception.- Parameters:
message- exception message
-
ApiException
public ApiException(String message, Throwable cause)
Create a new API Exception.- Parameters:
message- exception messagecause- cause of the exception
-
ApiException
public ApiException(String message, Integer code, String moreInfo, Integer status, Throwable cause)
Create a new API Exception.- Parameters:
message- exception messagecode- exception codemoreInfo- more information if availablestatus- status codecause- cause of the exception* @param cause
-
ApiException
public ApiException(RestException restException)
Create a new API Exception.- Parameters:
restException- the rest exception
-
-