public class ApiException extends HawaiiException
Modifier | Constructor and Description |
---|---|
protected |
ApiException(ApiError apiError)
Construct an API error.
|
protected |
ApiException(ApiError apiError,
java.lang.String message)
Construct an API error with a custome message.
|
protected |
ApiException(ApiError apiError,
java.lang.Throwable orig)
Construct an API error from a Throwable.
|
protected |
ApiException(ApiError apiError,
java.lang.Throwable orig,
java.lang.String message)
Construct an API error from a Throwable with a custom message.
|
Modifier and Type | Method and Description |
---|---|
ApiError |
getApiError()
Getter for the ApiError.
|
java.lang.String |
getErrorCode()
Convenience method to retrieve the error code from the contained API error.
|
java.lang.String |
getReason()
Convenience method to retrieve the reason from the contained API error.
|
protected ApiException(ApiError apiError)
apiError
- the error code.protected ApiException(ApiError apiError, java.lang.String message)
apiError
- the error code.protected ApiException(ApiError apiError, java.lang.Throwable orig)
apiError
- the error codeorig
- the cause of the errorprotected ApiException(ApiError apiError, java.lang.Throwable orig, java.lang.String message)
apiError
- the error codeorig
- the cause of the errorpublic ApiError getApiError()
public java.lang.String getErrorCode()
public java.lang.String getReason()