public class StackableException extends Exception
Modifier | Constructor and 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.
|
Modifier and Type | Method and 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 this
Throwable 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.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
protected StackableException()
protected StackableException(String message, Throwable ex)
message
- the exception message.ex
- the parent exception.protected StackableException(String message, Exception ex)
message
- the exception message.ex
- the parent exception.protected StackableException(String message)
message
- the exception message.public Exception getParent()
public Throwable getParentThrowable()
public String getMessage()
getMessage
in class Throwable
public 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.public void printStackTrace(PrintStream stream)
printStackTrace
in class Throwable
stream
- the output stream.public void printStackTrace(PrintWriter writer)
printStackTrace
in class 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 Throwable
System.err
Copyright © 2017 Hitachi Vantara. All rights reserved.