Class StackableRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jfree.util.StackableRuntimeException
- All Implemented Interfaces:
Serializable
A baseclass for RuntimeExceptions, which could have parent exceptions. These parent exceptions
are raised in a subclass and are now wrapped into a subclass of this Exception.
The parents are printed when this exception is printed. This class exists mainly for debugging reasons, as with them it is easier to detect the root cause of an error.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a StackableRuntimeException with no message and no parent.StackableRuntimeException(String message) Creates an exception.StackableRuntimeException(String message, Exception ex) Creates an exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parent exception (possibly null).voidprintStackTrace(PrintStream stream) Prints the stack trace to the specified stream.voidprintStackTrace(PrintWriter writer) Prints the stack trace to the specified writer.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StackableRuntimeException
public StackableRuntimeException()Creates a StackableRuntimeException with no message and no parent. -
StackableRuntimeException
Creates an exception.- Parameters:
message- the exception message.ex- the parent exception.
-
StackableRuntimeException
Creates an exception.- Parameters:
message- the exception message.
-
-
Method Details
-
getParent
-
printStackTrace
Prints the stack trace to the specified stream.- Overrides:
printStackTracein classThrowable- Parameters:
stream- the output stream.
-
printStackTrace
Prints the stack trace to the specified writer.- Overrides:
printStackTracein classThrowable- Parameters:
writer- the writer.
-