Package com.aquima.web.rest.v1.exception
Class RestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.aquima.web.rest.v1.exception.RestException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidParameterException
,ResourceNotFoundException
,UnauthorizedUserException
Base class for exceptions thrown by the REST API. Encapsultes the HTTP status code that should be returned when an
exception of this type occurs. The exception message should be suitable for display to the end user.
- Since:
- 9.6
- Author:
- Voicu Moldovan
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRestException
(String message) protected
RestException
(String message, int statusCode) Constructor meant for subclasses, which can specify the associated HTTP status code.RestException
(String message, Throwable cause) protected
RestException
(String message, Throwable cause, int statusCode) Constructor meant for subclasses, which can specify the associated HTTP status code. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RestException
-
RestException
-
RestException
Constructor meant for subclasses, which can specify the associated HTTP status code.- Parameters:
message
- the error messagestatusCode
- the HTTP status code
-
RestException
Constructor meant for subclasses, which can specify the associated HTTP status code.- Parameters:
message
- the error messagecause
- the wrapped exceptionstatusCode
- the HTTP status code
-
-
Method Details