java.lang
Class ExceptionInInitializerError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- java.lang.ExceptionInInitializerError
-
public class ExceptionInInitializerError extends Error
Thrown when an exception occurs during class initialization.
-
-
Constructor Summary
Constructors Constructor and Description ExceptionInInitializerError()
Constructs a newExceptionInInitializerError
that includes the current stack trace.ExceptionInInitializerError(String detailMessage)
Constructs a newExceptionInInitializerError
with the current stack trace and the specified detail message.ExceptionInInitializerError(Throwable exception)
Constructs a newExceptionInInitializerError
with the current stack trace and the specified cause.
-
Method Summary
Methods Modifier and Type Method and Description Throwable
getCause()
Returns the cause of this error, ornull
if there is no cause.Throwable
getException()
Returns the exception that is the cause of this error.-
Methods inherited from class java.lang.Throwable
fillInStackTrace, getMessage, getStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
ExceptionInInitializerError
public ExceptionInInitializerError()
Constructs a newExceptionInInitializerError
that includes the current stack trace.
-
ExceptionInInitializerError
public ExceptionInInitializerError(String detailMessage)
Constructs a newExceptionInInitializerError
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this error.
-
ExceptionInInitializerError
public ExceptionInInitializerError(Throwable exception)
Constructs a newExceptionInInitializerError
with the current stack trace and the specified cause. The exception should be the one which originally occurred in the class initialization code.- Parameters:
exception
- the exception that caused this error.
-
-
Method Detail
-
getException
public Throwable getException()
Returns the exception that is the cause of this error.- Returns:
- the exception that caused this error.
-
getCause
public Throwable getCause()
Returns the cause of this error, ornull
if there is no cause.- Returns:
- the exception that caused this error.
-
-