java.lang
Class Throwable

java.lang.Object
  extended by java.lang.Throwable
Direct Known Subclasses:
Exception

public class Throwable
extends Object


Constructor Summary
Throwable()
           
Throwable(String message)
           
Throwable(String message, Throwable cause)
           
Throwable(Throwable cause)
           
 
Method Summary
 Throwable fillInStackTrace()
          This method fills in the stack trace when a new Throwable is created.
 Throwable getCause()
           
 String getLocalizedMessage()
           
 String getMessage()
           
 void nullStackTrace()
           
 void printStackTrace()
           
 void printStackTrace(PrintStream s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, println
 

Constructor Detail

Throwable

public Throwable()

Throwable

public Throwable(String message)

Throwable

public Throwable(String message,
                 Throwable cause)

Throwable

public Throwable(Throwable cause)
Method Detail

getMessage

public String getMessage()

getLocalizedMessage

public String getLocalizedMessage()

getCause

public Throwable getCause()

toString

public String toString()
Overrides:
toString in class Object

printStackTrace

public void printStackTrace()

nullStackTrace

public void nullStackTrace()

printStackTrace

public void printStackTrace(PrintStream s)

fillInStackTrace

public Throwable fillInStackTrace()
This method fills in the stack trace when a new Throwable is created. This can be quite an expensive operation if the stack is deep, so if you are creating many Throwables (for example if you are using Throwables for program flow control) you should use a subclass of Throwable where this method is overridden. An acceptable implementation is just to return this.