Package org.apache.juneau.objecttools
Class ObjectRestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
org.apache.juneau.objecttools.ObjectRestException
- All Implemented Interfaces:
Serializable
Generic exception thrown from the
ObjectRest
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.
See Also:
-
Constructor Summary
ConstructorDescriptionObjectRestException
(int status, String message, Object... args) Constructor.ObjectRestException
(Throwable cause, int status, String message, Object... args) Constructor. -
Method Summary
Methods inherited from class org.apache.juneau.BasicRuntimeException
assertModifiable, fillInStackTrace, getCause, getMessage, initCause, isUnmodifiable, setMessage, setStackTrace, setUnmodifiable, unwrap
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, toString
-
Constructor Details
-
ObjectRestException
Constructor.- Parameters:
cause
- The cause of this exception.status
- HTTP status code.message
- TheMessageFormat
-style message.args
- OptionalMessageFormat
-style arguments.
-
ObjectRestException
Constructor.- Parameters:
status
- The HTTP-equivalent status code.message
- The detailed message.args
- OptionalMessageFormat
-style arguments.
-
-
Method Details
-
getStatus
The HTTP-equivalent status code.See above for details.
- Returns:
- The HTTP-equivalent status code.
-