com.digi.config.exception
Class LocalizationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.digi.config.exception.LocalizationException
All Implemented Interfaces:
java.io.Serializable

public class LocalizationException
extends java.lang.Exception

Thrown when message localization fails. NOTE: this exception does not extend from the ChainedThrowable family to prevent problems with recursion occuring because of localization failures. This exception is thrown by LocalizableMessage because of some localization problem. If it was part of the ChainedThrowable family, a LocalizableMessage would be used internally for the message text. There is a chance that whatever problem caused LocalizableMessage to throw this exception in the first place would occur during the creation of the exception (causing indirect recursion). Since the most common causes of this exception are either an internal problem or a Config configuration problem, we are not going to implement the logic necessary to prevent any recursion. Instead, we'll just not be localizable.

See Also:
Serialized Form

Field Summary
 java.lang.String key
          The key into the resource bundle for the message that was being localized
 java.lang.String resourceBundleName
          The name of the ResourceBundle that was being used when localization encountered the problem.
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
LocalizationException(java.lang.String message, java.lang.String resourceBundleName, java.lang.String key, boolean createLogEntry)
          Construct a LocalizableException with provided localizable message and nested Throwables.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resourceBundleName

public java.lang.String resourceBundleName
The name of the ResourceBundle that was being used when localization encountered the problem.


key

public java.lang.String key
The key into the resource bundle for the message that was being localized

Constructor Detail

LocalizationException

public LocalizationException(java.lang.String message,
                             java.lang.String resourceBundleName,
                             java.lang.String key,
                             boolean createLogEntry)
Construct a LocalizableException with provided localizable message and nested Throwables.

Parameters:
message - is the String containing details about this Exception (i.e. the informative part of why the exception was thrown).
resourceBundleName - is the name of the resource bundle containing the translatable message text. This must be a fully qualified name (e.g. com....xxxResourceBundle). It is a Mandatory parameter and may not be an empty String.
key - is the key into the resourceBundle of the message text to use for this localizable message. The resource associated with this key must either be a String or a MessageFormat. It is a Mandatory parameter and may not be an empty String.
createLogEntry - is a boolean that indicates whether this Exception should be logged in the SystemLog. true indicates that it should be logged.


Copyright © 2001-2002 Digi International. All Rights Reserved.