Contents | Prev | Next | Index

20.23 The Class
java.lang.ExceptionInInitializerError

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

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

20.23.1 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 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 (§20.22.3). There is no saved throwable object.

20.23.3 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 (§20.22.3). The error message string is set to null.

20.23.4 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.


Contents | Prev | Next | Index

Java Language Specification (HTML generated by Suzette Pelouch on February 24, 1998)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com



Spec-Zone.ru - all specs in one place



free hit counter