API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Throwable View Source
Author(s)
unascribed
Josh Bloch (Added exception chaining and programmatic access to stack trace in 1.4.)
Since
JDK1.0
Version
1.56, 03/07/06
Serial
Hierarchy
 Object
      Throwable
Implements
 Serializable
Subclasses
Description
public class Throwable
  The Throwable class is the superclass of all errors and exceptions in the Java language.
See also:   
Constructors
public Throwable ()
  Constructs a new throwable with null as its detail message.
public Throwable (String message)
  Constructs a new throwable with the specified detail message.
public Throwable (String message, Throwable cause)
  Constructs a new throwable with the specified detail message and cause.
public Throwable (Throwable cause)
  Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
Methods
Hide/Show inherited methods
publicsynchronizednative Throwable fillInStackTrace ()
  Fills in the execution stack trace.
public Throwable getCause ()
  Returns the cause of this throwable or null if the cause is nonexistent or unknown.
public String getLocalizedMessage ()
  Creates a localized description of this throwable.
public String getMessage ()
  Returns the detail message string of this throwable.
public StackTraceElement getStackTrace ()
  Provides programmatic access to the stack trace information printed by Throwable.printStackTrace().
publicsynchronized Throwable initCause (Throwable cause)
  Initializes the cause of this throwable to the specified value.
public void printStackTrace ()
  Prints this throwable and its backtrace to the standard error stream.
public void printStackTrace (PrintStream s)
  Prints this throwable and its backtrace to the specified print stream.
public void printStackTrace (PrintWriter s)
  Prints this throwable and its backtrace to the specified print writer.
public void setStackTrace (StackTraceElement stackTrace)
  Sets the stack trace elements that will be returned by Throwable.getStackTrace() and printed by Throwable.printStackTrace() and related methods.
public String toString ()
  Returns a short description of this throwable.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar