Class RequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tccc.kos.commons.util.dispatcher.exceptions.RequestException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,InternalErrorException
,NotFoundException
,UnauthorizedException
Base exception for all exceptions that can be thrown when a client makes a web request.
RequestException
and its subclasses are unchecked exceptions.
Unchecked exceptions do not need to be declared in a method or constructor's
throws
clause.
- Since:
- 1.0
- Version:
- 2022-09-01
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequestException
(int status, String message, Throwable cause) Constructs a new "request" exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RequestException
Constructs a new "request" exception.- Parameters:
status
- the HTTP status code associated with this exceptionmessage
- the detailed error messagecause
- the exception that caused this exception
-
-
Method Details
-
getStatus
public int getStatus()Returns the associated HTTP status code.- Returns:
- the HTTP status code
-