public final class PojoRestException extends FormattedRuntimeException
PojoRest class.
Typically, this is a user-error, such as trying to address a non-existent node in the tree.
The status code is an HTTP-equivalent code. It will be one of the following:
HTTP_BAD_REQUEST
- Attempting to do something impossible.
HTTP_NOT_FOUND
- Attempting to access a non-existent node in the tree.
HTTP_FORBIDDEN
- Attempting to overwrite the root object.
| Constructor and Description |
|---|
PojoRestException(int status,
String message,
Object... args)
Constructor.
|
PojoRestException(Throwable cause,
int status,
String message,
Object... args)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getStatus()
The HTTP-equivalent status code.
|
getMessageaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic PojoRestException(Throwable cause, int status, String message, Object... args)
cause - The cause of this exception.status - HTTP status code.message - The MessageFormat-style message.args - Optional MessageFormat-style arguments.public PojoRestException(int status, String message, Object... args)
status - The HTTP-equivalent status code.message - The detailed message.args - Optional MessageFormat-style arguments.public int getStatus()
See above for details.
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.