|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--javax.servlet.ServletException | +--com.ibm.websphere.servlet.error.ServletErrorReport
Represents an error reported by a servlet. Servlets can report errors to the server 2 ways: 1. servlets can explicitly call HttpServletResponse.sendError 2. servlets can throw uncaught Exceptions.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_NAME
The request-scoped attribute name that is used to retrieve a servlet error report. attribute name: ErrorReport |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
int |
getErrorCode()
Return the error code associated with this error. |
java.lang.String |
getMessage()
Returns a detailed message about the error. |
java.lang.String |
getStackTrace()
Returns the stack trace as a string. |
protected static java.lang.String |
getStackTrace(java.lang.Throwable th)
|
java.lang.String |
getTargetServletName()
Returns the name of the servlet that reported the error. |
protected void |
setErrorCode(int sc)
Subclasses can use this method to set the error code. |
protected void |
setTargetServletName(java.lang.String servletName)
Subclasses can use this method to set the status code. |
Methods inherited from class javax.servlet.ServletException |
---|
getRootCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ATTRIBUTE_NAME
Constructor Detail |
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 raisedMethod Detail |
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getStackTrace()
public int getErrorCode()
public java.lang.String getTargetServletName()
protected void setErrorCode(int sc)
protected void setTargetServletName(java.lang.String servletName)
protected static java.lang.String getStackTrace(java.lang.Throwable th)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |