public class

ExceptionInInitializerError

extends LinkageError
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Error
       ↳ java.lang.LinkageError
         ↳ java.lang.ExceptionInInitializerError

Class Overview

Thrown when an exception occurs during class initialization.

Summary

Public Constructors
ExceptionInInitializerError()
Constructs a new ExceptionInInitializerError that includes the current stack trace.
ExceptionInInitializerError(String detailMessage)
Constructs a new ExceptionInInitializerError with the current stack trace and the specified detail message.
ExceptionInInitializerError(Throwable exception)
Constructs a new ExceptionInInitializerError with the current stack trace and the specified cause.
Public Methods
Throwable getCause()
Returns the cause of this error, or null if there is no cause.
Throwable getException()
Returns the exception that is the cause of this error.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ExceptionInInitializerError ()

Constructs a new ExceptionInInitializerError that includes the current stack trace.

public ExceptionInInitializerError (String detailMessage)

Constructs a new ExceptionInInitializerError with the current stack trace and the specified detail message.

Parameters
detailMessage the detail message for this error.

public ExceptionInInitializerError (Throwable exception)

Constructs a new ExceptionInInitializerError 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.

Public Methods

public Throwable getCause ()

Returns the cause of this error, or null if there is no cause.

Returns
  • the exception that caused this error.

public Throwable getException ()

Returns the exception that is the cause of this error.

Returns
  • the exception that caused this error.