Package com.day.util
Class WrappedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.day.util.WrappedException
- All Implemented Interfaces:
Serializable
An Exception that wraps another Throwable, and prints its wrapped exception's
stack trace as well as its own when printStackTrace is called.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClass constructor that creates aWrappedExceptiongiven a message describing the failure causeWrappedException(String s, Throwable e) Class constructor that creates aWrappedExceptiongiven a message describing the failure cause and a root exceptionClass constructor that creates aWrappedExceptiongiven a root exception -
Method Summary
Modifier and TypeMethodDescriptionReturns the error message string of this exception.Returns the root exception of this exception.voidPrints thisWrappedExceptionand its backtrace to the standard error stream.voidPrints thisWrappedExceptionand its backtrace to the specified print stream.voidPrints thisWrappedExceptionand its backtrace to the specified print writer.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
WrappedException
Class constructor that creates aWrappedExceptiongiven a message describing the failure cause- Parameters:
s- description
-
WrappedException
Class constructor that creates aWrappedExceptiongiven a message describing the failure cause and a root exception- Parameters:
s- descriptione- root failure cause
-
WrappedException
Class constructor that creates aWrappedExceptiongiven a root exception- Parameters:
t- root failure cause
-
-
Method Details
-
getMessage
Returns the error message string of this exception.- Overrides:
getMessagein classThrowable- Returns:
- error message string of this exception.
-
getRootException
Returns the root exception of this exception.- Returns:
- the root exception of this exception
-
printStackTrace
public void printStackTrace()Prints thisWrappedExceptionand its backtrace to the standard error stream.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints thisWrappedExceptionand its backtrace to the specified print stream.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintStreamto use for output
-
printStackTrace
Prints thisWrappedExceptionand its backtrace to the specified print writer.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintWriterto use for output- Since:
- JDK1.1
-