|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.pentaho.reporting.libraries.base.util.StackableException
public class StackableException
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.
Method Summary | |
---|---|
java.lang.String |
getMessage()
Returns the detail message string of this throwable. |
java.lang.Exception |
getParent()
Deprecated. use the throwable instead. |
java.lang.Throwable |
getParentThrowable()
|
void |
printStackTrace()
Prints this Throwable and its backtrace to the standard error stream. |
void |
printStackTrace(java.io.PrintStream stream)
Prints the stack trace to the specified stream. |
void |
printStackTrace(java.io.PrintWriter writer)
Prints the stack trace to the specified writer. |
java.lang.String |
toString()
Returns a short description of this throwable. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.Exception getParent()
public java.lang.Throwable getParentThrowable()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String toString()
Throwable
object was created with a non-null detail
message string, then the result is the concatenation of three strings:
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.
toString
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
printStackTrace
in class java.lang.Throwable
stream
- the output stream.public void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
writer
- the writer.public void printStackTrace()
Throwable
and its backtrace to the standard error stream. This method prints a stack trace
for this Throwable
object on the error output stream that is the value of the field
System.err
. The first line of output contains the result of the toString()
method for this
object. Remaining lines represent data previously recorded by the method Throwable.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]); } }
printStackTrace
in class java.lang.Throwable
System.err
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |