nextapp.echoservlet
Class EchoServletException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
nextapp.echoservlet.EchoServletException
- All Implemented Interfaces:
- java.io.Serializable
- public class EchoServletException
- extends java.lang.RuntimeException
A generic runtime exception to handle circumstances that should
almost never happen. This class should be used to wrap checked exceptions
that shouldn't be possible to occur, instead of swallowing them.
- See Also:
- Serialized Form
Field Summary |
private java.lang.Throwable |
cause
|
Fields inherited from class java.lang.RuntimeException |
|
Fields inherited from class java.lang.Throwable |
|
Constructor Summary |
EchoServletException(java.lang.String message)
Creates a new EchoServletException with a description of its cause. |
EchoServletException(java.lang.String message,
java.lang.Throwable cause)
Creates a new EchoServletException with a description of its cause that
wraps another exception. |
Method Summary |
java.lang.Throwable |
getCause()
Returns the wrapped exception that caused this exception to be thrown. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cause
private java.lang.Throwable cause
EchoServletException
public EchoServletException(java.lang.String message)
- Creates a new EchoServletException with a description of its cause.
- Parameters:
message
- A message describing the exception.
EchoServletException
public EchoServletException(java.lang.String message,
java.lang.Throwable cause)
- Creates a new EchoServletException with a description of its cause that
wraps another exception.
- Parameters:
message
- A message describing the exception.cause
- The exception which caused this exception to be thrown.
getCause
public java.lang.Throwable getCause()
- Returns the wrapped exception that caused this exception to be thrown.
If the root cause was not a wrapped exception or is this object, null
is returned.
- Returns:
- The cause of this exception.