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