<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.lang.Throwable
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.ThreadGroup.html#_top_">Previous</a>  <a href="java.lang.Void.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.lang.Throwable
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.lang.Throwable
</pre>
<hr>
<dl>
  <dt> public class <b>Throwable</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The <code>Throwable</code> class is the superclass of all errors 
 and exceptions in the Java language. Only objects that are 
 instances of this class (or of one of its subclasses) are thrown 
 by the Java Virtual Machine or can be thrown by the Java 
 <code>throw</code> statement. Similarly, only this class or one of 
 its subclasses can be the argument type in a <code>catch</code> 
 clause. 
 <p>
 A <code>Throwable</code> class contains a snapshot of the 
 execution stack of its thread at the time it was created. It can 
 also contain a message string that gives more information about 
 the error. 
 <p>
 Here is one example of catching an exception: 
 <p><blockquote><pre>
     try {
         int a[] = new int[2];
         a[4];
     } catch (ArrayIndexOutOfBoundsException e) {
         System.out.println("exception: " + e.getMessage());
         e.printStackTrace();
     }
 </pre></blockquote>
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Throwable()"><b>Throwable</b></a>()
  <dd>  Constructs a new <code>Throwable</code> with no detail message.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Throwable(java.lang.String)"><b>Throwable</b></a>(String)
  <dd>  Constructs a new <code>Throwable</code> with the specified detail 
 message.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#fillInStackTrace()"><b>fillInStackTrace</b></a>()
  <dd>  Fills in the execution stack trace.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getLocalizedMessage()"><b>getLocalizedMessage</b></a>()
  <dd>  Creates a localized description of this <code>Throwable</code>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMessage()"><b>getMessage</b></a>()
  <dd>  Returns the detail message of this throwable object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#printStackTrace()"><b>printStackTrace</b></a>()
  <dd>  Prints this <code>Throwable</code> and its backtrace to the 
 standard error stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#printStackTrace(java.io.PrintStream)"><b>printStackTrace</b></a>(PrintStream)
  <dd>  Prints this <code>Throwable</code> and its backtrace to the 
 specified print stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#printStackTrace(java.io.PrintWriter)"><b>printStackTrace</b></a>(PrintWriter)
  <dd>  Prints this <code>Throwable</code> and its backtrace to the specified
 print writer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns a short description of this throwable object.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Throwable"></a>
<a name="Throwable()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Throwable</b>
<pre>
 public Throwable()
</pre>
<dl>
  <dd> Constructs a new <code>Throwable</code> with no detail message. 
 The stack trace is automatically filled in.
<p>
</dl>
<a name="Throwable(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Throwable</b>
<pre>
 public Throwable(<a href="java.lang.String.html#_top_">String</a> message)
</pre>
<dl>
  <dd> Constructs a new <code>Throwable</code> with the specified detail 
 message. The stack trace is automatically filled in.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> message - the detail message.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getMessage()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMessage"><b>getMessage</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getMessage()
</pre>
<dl>
  <dd> Returns the detail message of this throwable object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the detail message of this <code>Throwable</code>,
          or <code>null</code> if this <code>Throwable</code> does not
          have a detail message.
  </dl></dd>
</dl>
<a name="getLocalizedMessage()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getLocalizedMessage"><b>getLocalizedMessage</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getLocalizedMessage()
</pre>
<dl>
  <dd> Creates a localized description of this <code>Throwable</code>.
 Subclasses may override this method in order to produce a
 locale-specific message.  For subclasses that do not override this
 method, the default implementation returns the same result as
 <code>getMessage()</code>.
<p>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns a short description of this throwable object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this <code>Throwable</code>.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="printStackTrace()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="printStackTrace"><b>printStackTrace</b></a>
<pre>
 public void printStackTrace()
</pre>
<dl>
  <dd> Prints this <code>Throwable</code> and its backtrace to the 
 standard error stream.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#err">err</a>
  </dl></dd>
</dl>
<a name="printStackTrace(java.io.PrintStream)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="printStackTrace"><b>printStackTrace</b></a>
<pre>
 public void printStackTrace(<a href="java.io.PrintStream.html#_top_">PrintStream</a> s)
</pre>
<dl>
  <dd> Prints this <code>Throwable</code> and its backtrace to the 
 specified print stream.
<p>
</dl>
<a name="printStackTrace(java.io.PrintWriter)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="printStackTrace"><b>printStackTrace</b></a>
<pre>
 public void printStackTrace(<a href="java.io.PrintWriter.html#_top_">PrintWriter</a> s)
</pre>
<dl>
  <dd> Prints this <code>Throwable</code> and its backtrace to the specified
 print writer.
<p>
</dl>
<a name="fillInStackTrace()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="fillInStackTrace"><b>fillInStackTrace</b></a>
<pre>
 public native <a href="#_top_">Throwable</a> fillInStackTrace()
</pre>
<dl>
  <dd> Fills in the execution stack trace. This method is useful when an 
 application is re-throwing an error or exception. For example: 
 <p><blockquote><pre>
     try {
         a = b / c;
     } catch(ArithmeticThrowable e) {
         a = Number.MAX_VALUE;
         throw e.fillInStackTrace();
     }
 </pre></blockquote>
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> this <code>Throwable</code> object.
    <dt> <b>See Also:</b>
    <dd> <a href="#printStackTrace()">printStackTrace</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.ThreadGroup.html#_top_">Previous</a>  <a href="java.lang.Void.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
