|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Throwable Exception hirondelle.web4j.model.BadRequestException
public final class BadRequestException
Thrown by ApplicationFirewall
when a problem with an incoming HTTP request is detected.
This class is intended only for bugs and malicious attacks.
It is not intended for normal business logic. If a BadRequestException is
thrown by ApplicationFirewall
, then the
Controller
will reply with a short, unpolished
response (often a default page defined by the server). Under normal operating conditions,
the end user should not see such a response.
See ApplicationFirewall
for more information.
Design Note
This class is not an AppException
, since it is meant to encapsulate only a
single item at a time.
Constructor Summary | |
---|---|
BadRequestException(int aHTTPStatusCode)
Construct using a standard HTTP status code. |
|
BadRequestException(int aHTTPStatusCode,
String aErrorMessage)
Construct using a standard HTTP status code and an error message to be presented to the user. |
Method Summary | |
---|---|
String |
getErrorMessage()
Return the error message passed to the constructor. |
int |
getStatusCode()
Return the status code passed to the constructor. |
String |
toString()
Intended for debugging only. |
Methods inherited from class Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BadRequestException(int aHTTPStatusCode)
The caller is highly encouraged to pass a field defined in
HttpServletResponse
to this constructor
(HttpServletResponse.SC_NOT_IMPLEMENTED
, and so on).
See W3C HTTP Specification for more information on status codes.
public BadRequestException(int aHTTPStatusCode, String aErrorMessage)
BadRequestException(int)
for more information.
Method Detail |
---|
public int getStatusCode()
public String getErrorMessage()
public String toString()
toString
in class Throwable
|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |