home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / lang / ExceptionInInitializerError.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.7 KB  |  65 lines

  1. /*
  2.  * @(#)ExceptionInInitializerError.java    1.4 98/03/18
  3.  *
  4.  * Copyright 1996, 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.lang;
  16.  
  17. /**
  18.  * Signals that an unexpected exception has occurred in a static initializer.
  19.  *
  20.  * @author  Frank Yellin
  21.  * @version 1.4, 03/18/98
  22.  *
  23.  * @since   JDK1.1
  24.  */
  25. public
  26. class ExceptionInInitializerError extends LinkageError {
  27.     private Throwable exception;
  28.  
  29.     /**
  30.      * Constructs an ExceptionInInitializerError with no detail message.
  31.      * A detail message is a String that describes this particular exception.
  32.      */
  33.     public ExceptionInInitializerError() {
  34.     super();
  35.     }
  36.  
  37.     /**
  38.      * Constructs a new ExceptionInInitializerError class initialized to 
  39.      * the specific throwable
  40.      *
  41.      * @param thrown The exception thrown
  42.      */
  43.     public ExceptionInInitializerError(Throwable thrown) {
  44.     this.exception = thrown;
  45.     }
  46.  
  47.     /**
  48.      * Constructs a ExceptionInInitializerError with the specified detail message.
  49.      * A detail message is a String that describes this particular exception.
  50.      *
  51.      * @param s the detail message
  52.      */
  53.     public ExceptionInInitializerError(String s) {
  54.     super(s);
  55.     }
  56.  
  57.     /**
  58.      * Returns the exception that occurred during a static initialization that
  59.      * caused this Error to be created.
  60.      */
  61.     public Throwable getException() { 
  62.     return exception;
  63.     }
  64. }
  65.