Class StackableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.pentaho.reporting.libraries.base.util.StackableException
-
- All Implemented Interfaces:
Serializable
public class StackableException extends Exception
Deprecated.Use ordinary exception as your base class.A baseclass for exceptions, 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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StackableException()
Deprecated.Creates a StackableRuntimeException with no message and no parent.protected
StackableException(String message)
Deprecated.Creates an exception.protected
StackableException(String message, Exception ex)
Deprecated.use the throwable-version instead.protected
StackableException(String message, Throwable ex)
Deprecated.Creates an exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getMessage()
Deprecated.Returns the detail message string of this throwable.Exception
getParent()
Deprecated.use the throwable instead.Throwable
getParentThrowable()
Deprecated.void
printStackTrace()
Deprecated.Prints thisThrowable
and its backtrace to the standard error stream.void
printStackTrace(PrintStream stream)
Deprecated.Prints the stack trace to the specified stream.void
printStackTrace(PrintWriter writer)
Deprecated.Prints the stack trace to the specified writer.String
toString()
Deprecated.Returns a short description of this throwable.protected void
update(String message, Throwable parent)
Deprecated.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
-
-
-
Constructor Detail
-
StackableException
protected StackableException()
Deprecated.Creates a StackableRuntimeException with no message and no parent.
-
StackableException
protected StackableException(String message, Throwable ex)
Deprecated.Creates an exception.- Parameters:
message
- the exception message.ex
- the parent exception.
-
StackableException
protected StackableException(String message, Exception ex)
Deprecated.use the throwable-version instead.Creates an exception.- Parameters:
message
- the exception message.ex
- the parent exception.
-
StackableException
protected StackableException(String message)
Deprecated.Creates an exception.- Parameters:
message
- the exception message.
-
-
Method Detail
-
getParent
public Exception getParent()
Deprecated.use the throwable instead.Returns the parent exception (possibly null).- Returns:
- the parent exception.
-
getParentThrowable
public Throwable getParentThrowable()
Deprecated.
-
getMessage
public String getMessage()
Deprecated.Returns the detail message string of this throwable.- Overrides:
getMessage
in classThrowable
- Returns:
- the detail message string of this Throwable instance (which may be null).
-
toString
public String toString()
Deprecated.Returns a short description of this throwable. If thisThrowable
object was created with a non-null detail message string, then the result is the concatenation of three strings:- The name of the actual class of this object
- ": " (a colon and a space)
- The result of the
getMessage()
method for this object
Throwable
object was created with a null detail message string, then the name of the actual class of this object is returned.
-
printStackTrace
public void printStackTrace(PrintStream stream)
Deprecated.Prints the stack trace to the specified stream.- Overrides:
printStackTrace
in classThrowable
- Parameters:
stream
- the output stream.
-
printStackTrace
public void printStackTrace(PrintWriter writer)
Deprecated.Prints the stack trace to the specified writer.- Overrides:
printStackTrace
in classThrowable
- Parameters:
writer
- the writer.
-
printStackTrace
public void printStackTrace()
Deprecated.Prints thisThrowable
and its backtrace to the standard error stream. This method prints a stack trace for thisThrowable
object on the error output stream that is the value of the fieldSystem.err
. The first line of output contains the result of thetoString()
method for this object. Remaining lines represent data previously recorded by the methodThrowable.fillInStackTrace()
. The format of this information depends on the implementation, but the following example may be regarded as typical:
This example was produced by running the program:java.lang.NullPointerException at MyClass.mash(MyClass.java:9) at MyClass.crunch(MyClass.java:6) at MyClass.main(MyClass.java:3)
class MyClass { public static void main(String[] argv) { crunch(null); } static void crunch(int[] a) { mash(a); } static void mash(int[] b) { System.out.println(b[0]); } }
- Overrides:
printStackTrace
in classThrowable
- See Also:
System.err
-
-