public class ApiException
extends java.lang.Exception
| Constructor and Description |
|---|
ApiException(int statusCode,
java.lang.String error,
java.lang.String description)
Constructs a new ApiException with specified status code, error and description.
|
ApiException(int statusCode,
java.lang.String error,
java.lang.String description,
java.lang.Throwable cause)
Constructs a new ApiException with specified status code, error and description.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getError()
Gets the error/name of the exception.
|
int |
getStatusCode()
Gets the status code of the exception.
|
public ApiException(int statusCode,
java.lang.String error,
java.lang.String description)
statusCode - The status code of the exception. Maps to HTTP status codes.error - The error/name of the exception.description - The reason and description for the exception.public ApiException(int statusCode,
java.lang.String error,
java.lang.String description,
java.lang.Throwable cause)
statusCode - The status code of the exception. Maps to HTTP status codes.error - The error/name of the exception.description - The reason and description for the exception.cause - The underlying cause of the error case.