Team LiB
Previous Section Next Section

ExceptionInInitializerErrorjava.lang

Java 1.1serializable error

This error is thrown by the Java Virtual Machine when an exception occurs in the static initializer of a class. You can use the getException( ) method to obtain the Throwable object that was thrown from the initializer. In Java 1.4 and later, getException( ) has been superseded by the more general getCause( ) method of the THRowable class.

Figure 10-22. java.lang.ExceptionInInitializerError


public class ExceptionInInitializerError extends LinkageError {
// Public Constructors
     public ExceptionInInitializerError( );  
     public ExceptionInInitializerError(String s);  
     public ExceptionInInitializerError(Throwable thrown);  
// Public Instance Methods
     public Throwable getException( );                                    default:null
// Public Methods Overriding Throwable
1.4  public Throwable getCause( );                                    default:null
}

    Team LiB
    Previous Section Next Section