home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / ExceptionInInitializerError.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  69 lines

  1. /*
  2.  * @(#)ExceptionInInitializerError.java    1.3 98/07/01
  3.  *
  4.  * Copyright 1996-1998 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.3, 07/01/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.      * @since   JDK1.1
  34.      */
  35.     public ExceptionInInitializerError() {
  36.     super();
  37.     }
  38.  
  39.     /**
  40.      * Constructs a new ExceptionInInitializerError class initialized to 
  41.      * the specific throwable
  42.      *
  43.      * @param thrown The exception thrown
  44.      * @since   JDK1.1
  45.      */
  46.     public ExceptionInInitializerError(Throwable thrown) {
  47.     this.exception = thrown;
  48.     }
  49.  
  50.     /**
  51.      * Constructs a ExceptionInInitializerError with the specified detail message.
  52.      * A detail message is a String that describes this particular exception.
  53.      *
  54.      * @param s the detail message
  55.      * @since   JDK1.1
  56.      */
  57.     public ExceptionInInitializerError(String s) {
  58.     super(s);
  59.     }
  60.  
  61.     /**
  62.      * Returns the exception that occurred during a static initialization that
  63.      * caused this Error to be created.
  64.      */
  65.     public Throwable getException() { 
  66.     return exception;
  67.     }
  68. }
  69.