English | Site Directory

Android - An Open Handset Alliance Project

java.lang
public class

java.lang.Throwable

java.lang.Object
java.lang.Throwable Serializable

This class is the superclass of all classes which can be thrown by the virtual machine. The two direct subclasses represent recoverable exceptions (Exception) and unrecoverable errors (Error). This class provides common methods for accessing a string message which provides extra information about the circumstances in which the Throwable was created, and for filling in a stack trace (i.e., a record of the call stack at a particular point in time) which can be printed later.

Known Direct Subclasses
Known Indirect Subclasses

Summary

Public Constructors

          Throwable()
Constructs a new instance of this class with its stack trace filled in.
          Throwable(String detailMessage)
Constructs a new instance of this class with its stack trace and message filled in.
          Throwable(String detailMessage, Throwable throwable)
Constructs a new instance of this class with its stack trace, message, and cause filled in.
          Throwable(Throwable throwable)
Constructs a new instance of this class with its stack trace and cause filled in.

Public Methods

        Throwable  fillInStackTrace()
Records in the receiver a stack trace from the point where this message was sent.
        Throwable  getCause()
Returns the cause of this Throwable, or null if there is no cause.
        String  getLocalizedMessage()
Returns the extra information message which was provided when the throwable was created.
        String  getMessage()
Returns the extra information message which was provided when the throwable was created.
        StackTraceElement[]  getStackTrace()
Returns an array of StackTraceElement.
        Throwable  initCause(Throwable throwable)
Initialize the cause of the receiver.
        void  printStackTrace()
Outputs a printable representation of the receiver's stack trace on the System.err stream.
        void  printStackTrace(PrintWriter err)
Outputs a printable representation of the receiver's stack trace on the PrintWriter specified by the argument.
        void  printStackTrace(PrintStream err)
Outputs a printable representation of the receiver's stack trace on the PrintStream specified by the argument.
        void  setStackTrace(StackTraceElement[] trace)
Sets the array of StackTraceElements.
        String