public class ServletErrorReport
extends javax.servlet.ServletException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_NAME
The request-scoped attribute name that is used to retrieve a servlet error report.
attribute name: ErrorReport |
Constructor and Description |
---|
ServletErrorReport() |
ServletErrorReport(java.lang.String message)
Constructs a new ServletErrorReport with the specified message.
|
ServletErrorReport(java.lang.String message,
java.lang.Throwable rootCause)
Constructs a new ServletErrorReport with the specified message
and root cause.
|
ServletErrorReport(java.lang.Throwable rootCause)
Constructs a new ServletErrorReport with the specified message
and root cause.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDebugMessageAsHTML() |
int |
getErrorCode()
Return the error code associated with this error.
|
java.lang.Class |
getExceptionClass()
Returns the java.lang.Class of the root cause.
|
java.lang.String |
getExceptionType()
Returns the fully-qualified class name of the exception.
|
java.lang.String |
getMessage()
Returns a detailed message about the error.
|
java.lang.String |
getMessageAsHTML()
Returns a detailed message about the error in HTML.
|
java.lang.String |
getStackTraceAsString()
Returns the stack trace as a string.
|
java.lang.String |
getTargetServletName()
Returns the name of the servlet that reported the error.
|
java.lang.String |
getUnencodedMessage()
Returns an unencoded detailed message about the error.
|
java.lang.String |
getUnencodedMessageAsHTML()
Returns a detailed message about the error in HTML.
|
void |
setErrorCode(int sc)
Subclasses can use this method to set the error code.
|
public static final java.lang.String ATTRIBUTE_NAME
public ServletErrorReport()
public ServletErrorReport(java.lang.String message)
message
- Message of exceptionpublic ServletErrorReport(java.lang.String message, java.lang.Throwable rootCause)
message
- Message of exceptionrootCause
- Exception that caused this exception to be raisedpublic ServletErrorReport(java.lang.Throwable rootCause)
rootCause
- Exception that caused this exception to be raisedpublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getUnencodedMessage()
public java.lang.String getMessageAsHTML()
public java.lang.String getUnencodedMessageAsHTML()
public java.lang.String getStackTraceAsString()
public int getErrorCode()
public java.lang.String getTargetServletName()
public void setErrorCode(int sc)
public java.lang.String getExceptionType()
public java.lang.Class getExceptionClass()
public java.lang.String getDebugMessageAsHTML()