Class ServletErrorReport

java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
com.ibm.websphere.servlet.error.ServletErrorReport
All Implemented Interfaces:
Serializable

public class ServletErrorReport extends jakarta.servlet.ServletException
See Also:
  • Field Details

    • ATTRIBUTE_NAME

      public static final String 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

      public ServletErrorReport(String message)
      Constructs a new ServletErrorReport with the specified message.
      Parameters:
      message - Message of exception
    • ServletErrorReport

      public ServletErrorReport(String message, Throwable rootCause)
      Constructs a new ServletErrorReport with the specified message and root cause.
      Parameters:
      message - Message of exception
      rootCause - Exception that caused this exception to be raised
    • ServletErrorReport

      public ServletErrorReport(Throwable rootCause)
      Constructs a new ServletErrorReport with the specified message and root cause.
      Parameters:
      rootCause - Exception that caused this exception to be raised
  • Method Details

    • getMessage

      public String getMessage()
      Returns a detailed message about the error.
      Overrides:
      getMessage in class Throwable
    • getUnencodedMessage

      public String getUnencodedMessage()
      Returns an unencoded detailed message about the error.
    • getMessageAsHTML

      public String getMessageAsHTML()
      Returns a detailed message about the error in HTML.
    • getUnencodedMessageAsHTML

      public String getUnencodedMessageAsHTML()
      Returns a detailed message about the error in HTML.
    • getStackTraceAsString

      public String getStackTraceAsString()
      Returns the stack trace as a string.
    • getErrorCode

      public int getErrorCode()
      Return the error code associated with this error.
    • getTargetServletName

      public String 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

      public String getExceptionType()
      Returns the fully-qualified class name of the exception.
    • getExceptionClass

      public Class getExceptionClass()
      Returns the java.lang.Class of the root cause.
    • getDebugMessageAsHTML

      public String getDebugMessageAsHTML()