Class ExceptionInInitializerError
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.LinkageError
java.lang.ExceptionInInitializerError
Signals that an unexpected exception has occurred in a static initializer.
Present so an interpreted class initializer can fail the way Java says it
fails: the first touch of a class whose <clinit> threw reports this, and
every touch after it reports NoClassDefFoundError. Without the type, a
pushed program's catch (ExceptionInInitializerError e) names a class the
device does not have.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an ExceptionInInitializerError with no detail message.Constructs an ExceptionInInitializerError with the specified detail message.ExceptionInInitializerError(Throwable thrown) Constructs an ExceptionInInitializerError for the given throwable. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()Same as getException(), for code written against the Throwable API.The exception the class initializer threw, or null.Methods inherited from class Throwable
addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExceptionInInitializerError
public ExceptionInInitializerError()Constructs an ExceptionInInitializerError with no detail message. -
ExceptionInInitializerError
Constructs an ExceptionInInitializerError with the specified detail message. s - the detail message. -
ExceptionInInitializerError
Constructs an ExceptionInInitializerError for the given throwable. thrown - the exception the initializer threw.
-
-
Method Details
-
getException
The exception the class initializer threw, or null. -
getCause
-