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 classExceptionInInitializerErrorextends RuntimeException { publicExceptionInInitializerError(); publicExceptionInInitializerError(String s); publicExceptionInInitializerError(Throwable thrown); public ThrowablegetException(); }
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.