public class HttpException extends RuntimeException
REST methods on subclasses of
Constructor and Description |
---|
HttpException(int status,
String msg,
Object... args)
Constructor.
|
HttpException(String msg)
Constructor.
|
HttpException(Throwable cause,
int status)
Constructor.
|
HttpException(Throwable cause,
int status,
String msg,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getFullStackMessage(boolean scrubForXssVulnerabilities)
Returns all error messages from all errors in this stack.
|
Throwable |
getRootCause()
Returns the root cause of this exception.
|
int |
getStatus()
Returns the HTTP status code.
|
int |
hashCode() |
protected HttpException |
setStatus(int status)
Set the status code on this exception.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public HttpException(Throwable cause, int status, String msg, Object... args)
cause
- The cause of this exception.status
- The HTTP status code.msg
- The status message.args
- Optional MessageFormat
-style arguments.public HttpException(String msg)
msg
- The status message.public HttpException(Throwable cause, int status)
cause
- The root exception.status
- The HTTP status code.public HttpException(int status, String msg, Object... args)
status
- The HTTP status code.msg
- The status message.args
- Optional MessageFormat
-style arguments.public Throwable getRootCause()
The root cause is the first exception in the init-cause parent chain that's not one of the following:
public String getFullStackMessage(boolean scrubForXssVulnerabilities)
Typically useful if you want to render all the error messages in the stack, but don't want to render all the stack traces too.
scrubForXssVulnerabilities
- If protected HttpException setStatus(int status)
status
- The status code.public int getStatus()
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.