THE PACKAGE JAVA.LANG
java.lang.Throwable
and its Subclasses
20.22
The name of the actual class of this object
": "
(a colon and a space)
The result of the
getMessage
method ( 20.22.3) for this object
If this
Throwable
object was created with no error message string ( 20.22.1),
then the name of the actual class of this object is returned.
20.22.5
public Throwable fillInStackTrace()
This method records within this
Throwable
object information about the current
state of the stack frames for the current thread.
20.22.6
public void printStackTrace()
This method prints a stack trace for this
Throwable
object on the error output
stream that is the value of the field
System.err
( 20.18.3). The first line of output
contains the result of the
toString
method ( 20.22.4) for this object. Remaining
lines represent data previously recorded by the method
fillInStackTrace
( 20.22.5). The format of this information depends on the implementation, but the
following example may be regarded as typical:
java.lang.NullPointerException
at MyClass.mash(MyClass.java:9)
at MyClass.crunch(MyClass.java:6)
at MyClass.main(MyClass.java:3)
This example was produced by running the program:
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]);
}
613
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved