Package java.util

Class MissingResourceException

All Implemented Interfaces:
Serializable

public class MissingResourceException
extends RuntimeException
A MissingResourceException is thrown by ResourceBundle when a resource bundle cannot be found or a resource is missing from a resource bundle.
See Also:
ResourceBundle, RuntimeException, Serialized Form
  • Constructor Details

    • MissingResourceException

      public MissingResourceException​(String detailMessage, String className, String resourceName)
      Constructs a new MissingResourceException with the stack trace, message, the class name of the resource bundle and the name of the missing resource filled in.
      Parameters:
      detailMessage - the detail message for the exception.
      className - the class name of the resource bundle.
      resourceName - the name of the missing resource.
  • Method Details

    • getClassName

      public String getClassName()
      Returns the class name of the resource bundle from which a resource could not be found, or in the case of a missing resource, the name of the missing resource bundle.
      Returns:
      the class name of the resource bundle.
    • getKey

      public String getKey()
      Returns the name of the missing resource, or an empty string if the resource bundle is missing.
      Returns:
      the name of the missing resource.