public class RestHandlerException extends Exception
RestHandlers to notify the XatkitServer.
This exception is used to set the HTTP response's status code in the XatkitServer: by default the server
returns a status code 200, but it will return a 404 if the RestHandler threw a
RestHandlerException.
| Modifier | Constructor and Description |
|---|---|
|
RestHandlerException()
Constructs a
RestHandlerException. |
|
RestHandlerException(int errorCode,
String message)
|
|
RestHandlerException(int errorCode,
String message,
Throwable cause)
|
|
RestHandlerException(int errorCode,
Throwable cause)
|
|
RestHandlerException(String message)
Constructs a
RestHandlerException from the provided message. |
|
RestHandlerException(String message,
Throwable cause)
|
protected |
RestHandlerException(String message,
Throwable cause,
boolean enableSuppression,
boolean writeableStackTrace)
Constructs a
RestHandlerException from the provided message, cause, enableSuppression, and writeableStackTrace. |
|
RestHandlerException(Throwable cause)
Constructs a
RestHandlerException from the provided cause. |
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Returns the HTTP error code associated to this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic RestHandlerException()
RestHandlerException.
The errorCode of the created exception is set to HttpStatus.SC_NOT_FOUND.
public RestHandlerException(int errorCode,
String message)
errorCode - the HTTP error codemessage - the exception's messagepublic RestHandlerException(String message)
RestHandlerException from the provided message.
The errorCode of the created exception is set to HttpStatus.SC_NOT_FOUND.
message - the exception's messagepublic RestHandlerException(String message, Throwable cause)
RestHandlerException from the provided message and cause.
The errorCode of the created exception is set to HttpStatus.SC_NOT_FOUND.
message - the exception's messagecause - the exception's causepublic RestHandlerException(int errorCode,
String message,
Throwable cause)
errorCode - errorCode the HTTP error codemessage - the exception's messagecause - the exception's causepublic RestHandlerException(Throwable cause)
RestHandlerException from the provided cause.
The errorCode of the created exception is set to HttpStatus.SC_NOT_FOUND.
cause - the exception's causepublic RestHandlerException(int errorCode,
Throwable cause)
errorCode - the HTTP error codecause - the exception's causeprotected RestHandlerException(String message, Throwable cause, boolean enableSuppression, boolean writeableStackTrace)
RestHandlerException from the provided message, cause, enableSuppression, and writeableStackTrace.message - the exception's messagecause - the exception's causeenableSuppression - whether or not suppression is enabledwriteableStackTrace - whether or not the stack trace should be writableCopyright © 2020 SOM Research Lab. All rights reserved.