CHAPTER 20: The Package java.lang Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

20.23 The Class java.lang.ExceptionInInitializerError

20.23.1 ExceptionInInitializerError , 20.23.2 ExceptionInInitializerError , 20.23.3 ExceptionInInitializerError , 20.23.4 getException

An ExceptionInInitializerError is thrown to indicate that an exception occurred during evaluation of a static initializer or the initializer for a static variable (S12.4.2).

public class ExceptionInInitializerError
		extends RuntimeException {
	public ExceptionInInitializerError();
	public ExceptionInInitializerError(String s);
	public ExceptionInInitializerError(Throwable thrown);
	public Throwable getException();
}


20.23.1 ExceptionInInitializerError

public ExceptionInInitializerError()

This constructor initializes a newly created ExceptionInInitializerError with null as its error message string and with a no saved throwable object.


20.23.2 ExceptionInInitializerError

public ExceptionInInitializerError(String s)

This constructor initializes a newly created ExceptionInInitializerError by saving a reference to the error message string s for later retrieval by the getMessage method (S20.22.3). There is no saved throwable object.


20.23.3 ExceptionInInitializerError

public ExceptionInInitializerError(Throwable thrown)

This constructor initializes a newly created ExceptionInInitializerError by saving a reference to the Throwable object thrown for later retrieval by the getException method (S20.22.3). The error message string is set to null.


20.23.4 getException

public Throwable getException(Throwable thrown)

The saved throwable object of this ExceptionInInitializerError is returned; null is returned if this ExceptionInInitializerError has no saved throwable object.

Top© 1996 Sun Microsystems, Inc. All rights reserved.