Package com.ibm.websphere.servlet.error
Class ServletErrorReport
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
com.ibm.websphere.servlet.error.ServletErrorReport
- All Implemented Interfaces:
Serializable
public class ServletErrorReport
extends javax.servlet.ServletException
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The request-scoped attribute name that is used to retrieve a servlet error report.
attribute name: ErrorReport -
Constructor Summary
ConstructorDescriptionServletErrorReport
(String message) Constructs a new ServletErrorReport with the specified message.ServletErrorReport
(String message, Throwable rootCause) Constructs a new ServletErrorReport with the specified message and root cause.ServletErrorReport
(Throwable rootCause) Constructs a new ServletErrorReport with the specified message and root cause. -
Method Summary
Modifier and TypeMethodDescriptionint
Return the error code associated with this error.Returns the java.lang.Class of the root cause.Returns the fully-qualified class name of the exception.Returns a detailed message about the error.Returns a detailed message about the error in HTML.Returns the stack trace as a string.Returns the name of the servlet that reported the error.Returns an unencoded detailed message about the error.Returns a detailed message about the error in HTML.void
setErrorCode
(int sc) Subclasses can use this method to set the error code.Methods inherited from class javax.servlet.ServletException
getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ATTRIBUTE_NAME
The request-scoped attribute name that is used to retrieve a servlet error report.
attribute name: ErrorReport- See Also:
-
-
Constructor Details
-
ServletErrorReport
public ServletErrorReport() -
ServletErrorReport
Constructs a new ServletErrorReport with the specified message.- Parameters:
message
- Message of exception
-
ServletErrorReport
Constructs a new ServletErrorReport with the specified message and root cause.- Parameters:
message
- Message of exceptionrootCause
- Exception that caused this exception to be raised
-
ServletErrorReport
Constructs a new ServletErrorReport with the specified message and root cause.- Parameters:
rootCause
- Exception that caused this exception to be raised
-
-
Method Details
-
getMessage
Returns a detailed message about the error.- Overrides:
getMessage
in classThrowable
-
getUnencodedMessage
Returns an unencoded detailed message about the error. -
getMessageAsHTML
Returns a detailed message about the error in HTML. -
getUnencodedMessageAsHTML
Returns a detailed message about the error in HTML. -
getStackTraceAsString
Returns the stack trace as a string. -
getErrorCode
public int getErrorCode()Return the error code associated with this error. -
getTargetServletName
Returns the name of the servlet that reported the error. -
setErrorCode
public void setErrorCode(int sc) Subclasses can use this method to set the error code. -
getExceptionType
Returns the fully-qualified class name of the exception. -
getExceptionClass
Returns the java.lang.Class of the root cause. -
getDebugMessageAsHTML
-