Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ExceptionInInitializerError

public class ExceptionInInitializerError
extends LinkageError

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


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.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

ExceptionInInitializerError

Added in API level 1
ExceptionInInitializerError ()

Constructs a new ExceptionInInitializerError that includes the current stack trace.

ExceptionInInitializerError

Added in API level 1
ExceptionInInitializerError (String detailMessage)

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

Parameters
detailMessage String: the detail message for this error.

ExceptionInInitializerError

Added in API level 1
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 Throwable: the exception that caused this error.

Public methods

getCause

Added in API level 1
Throwable getCause ()

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

Returns
Throwable the exception that caused this error.

getException

Added in API level 1
Throwable getException ()

Returns the exception that is the cause of this error.

Returns
Throwable the exception that caused this error.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.