Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public class ExceptionInInitializerError

  1. Object
  2. Throwable
  3. Error
  4. LinkageError
  5. 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.

Constructors

public ExceptionInInitializerError()Constructs an ExceptionInInitializerError with no detail message.
public ExceptionInInitializerError(String s)Constructs an ExceptionInInitializerError with the specified detail message.
public ExceptionInInitializerError(Throwable thrown)Constructs an ExceptionInInitializerError for the given throwable.

Methods

public Throwable getException()The exception the class initializer threw, or null.
public Throwable getCause()Same as getException(), for code written against the Throwable API.

Inherited methods

Constructor details

ExceptionInInitializerError

public ExceptionInInitializerError()
Constructs an ExceptionInInitializerError with no detail message.

ExceptionInInitializerError

public ExceptionInInitializerError(String s)
Constructs an ExceptionInInitializerError with the specified detail message. s - the detail message.

ExceptionInInitializerError

public ExceptionInInitializerError(Throwable thrown)
Constructs an ExceptionInInitializerError for the given throwable. thrown - the exception the initializer threw.

Method details

getException

public Throwable getException()
The exception the class initializer threw, or null.

getCause

public Throwable getCause()
Same as getException(), for code written against the Throwable API.