Package com.sinch.sdk.core.exceptions
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sinch.sdk.core.exceptions.ApiException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ApiAuthException
,ApiMappingException
Base Sinch Client API exception
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs an ApiException with no detail message.ApiException
(int code, String message) Constructs an ApiException with the specified detail message and a codeApiException
(String message) Constructs an ApiException with the specified detail message.ApiException
(String message, Throwable throwable) Constructs an ApiException with the specified detail message and with the specified causeApiException
(String message, Throwable throwable, int code) Constructs an ApiException with the specified detail message, the specified cause and a codeApiException
(Throwable throwable) Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ApiException
public ApiException()Constructs an ApiException with no detail message. -
ApiException
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables- Parameters:
throwable
- Cause
-
ApiException
Constructs an ApiException with the specified detail message.- Parameters:
message
- the detail message.- Since:
- 1.0
-
ApiException
Constructs an ApiException with the specified detail message and with the specified cause- Parameters:
message
- The detail messagethrowable
- Cause
-
ApiException
Constructs an ApiException with the specified detail message, the specified cause and a code- Parameters:
message
- The detail messagethrowable
- Causecode
- Code
-
ApiException
Constructs an ApiException with the specified detail message and a code- Parameters:
code
- Codemessage
- The detail message
-
-
Method Details