home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / MissingResourceException.java < prev    next >
Text File  |  1997-05-20  |  3KB  |  74 lines

  1. /*
  2.  * @(#)MissingResourceException.java    1.4 97/01/29
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  8.  *
  9.  *   The original version of this source code and documentation is copyrighted
  10.  * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
  11.  * materials are provided under terms of a License Agreement between Taligent
  12.  * and Sun. This technology is protected by multiple US and International
  13.  * patents. This notice and attribution to Taligent may not be removed.
  14.  *   Taligent is a registered trademark of Taligent, Inc.
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software
  17.  * and its documentation for NON-COMMERCIAL purposes and without
  18.  * fee is hereby granted provided that this copyright notice
  19.  * appears in all copies. Please refer to the file "copyright.html"
  20.  * for further important copyright and licensing information.
  21.  *
  22.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  23.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  24.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  25.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  26.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  27.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  28.  *
  29.  */
  30.  
  31. package java.util;
  32.  
  33. /**
  34.  * Signals that a resource is missing.
  35.  * @see java.io.Exception
  36.  * @see ResourceBundle
  37.  * @version     1.4, 01/29/97
  38.  * @author      Mark Davis
  39.  */
  40. public
  41. class MissingResourceException extends RuntimeException {
  42.  
  43.     /**
  44.      * Constructs a MissingResourceException with the specified information.
  45.      * A detail message is a String that describes this particular exception.
  46.      * @param s the detail message
  47.      * @param classname the name of the resource class
  48.      * @param key the key for the missing resource.
  49.      */
  50.     public MissingResourceException(String s, String className, String key) {
  51.         super(s);
  52.         this.className = className;
  53.         this.key = key;
  54.     }
  55.  
  56.     /**
  57.      * Gets parameter passed by constructor.
  58.      */
  59.     public String getClassName() {
  60.         return className;
  61.     }
  62.  
  63.     /**
  64.      * Gets parameter passed by constructor.
  65.      */
  66.     public String getKey() {
  67.         return key;
  68.     }
  69.  
  70.     //============ privates ============
  71.     private String className;
  72.     private String key;
  73. }
  74.