Package com.idanalyzer
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.idanalyzer.ApiException
- All Implemented Interfaces:
Serializable
Thrown when the ID Analyzer API returns an error, or a transport error occurs.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionApiException(String message, String code) Creates an exception with an error message and code.ApiException(String message, String code, Throwable cause) Creates an exception with an error message, code and underlying cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ApiException
Creates an exception with an error message and code.- Parameters:
message- the human-readable error message.code- the API error code, or a transport code such as "TRANSPORT".
-
ApiException
Creates an exception with an error message, code and underlying cause.- Parameters:
message- the human-readable error message.code- the API error code, or a transport code such as "TRANSPORT".cause- the underlying throwable that triggered this exception.
-
-
Method Details
-
getCode
The API error code (or "TRANSPORT" for network/transport errors).- Returns:
- the error code associated with this exception.
-