org.scopemvc.util
Class LocalizedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.scopemvc.util.LocalizedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ControlException

public class LocalizedException
extends java.lang.Exception

An Exception that implements getLocalizedMessage() by looking up its message as an ID that is looked up in UIStrings to present the user with a localised message: message parameters passed in are substituted in the message as java.text.MessageFormat.

Version:
$Revision: 1.5 $ $Date: 2002/09/05 15:41:46 $
Author:
Steve Meyfroidt
See Also:
Serialized Form

Constructor Summary
LocalizedException(java.lang.String inMessageID)
          Create with a message id, but no message parameters.
LocalizedException(java.lang.String inMessageID, java.lang.Object inMessageParameter)
          Create with a message id and one message parameter.
LocalizedException(java.lang.String inMessageID, java.lang.Object[] inMessageParameters)
          Create with a message id and message parameters.
 
Method Summary
 java.lang.String getLocalizedMessage()
          Use the message as an ID to a message pattern in the UIStrings and use MessageFormat to format it with the message parameters.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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
 

Constructor Detail

LocalizedException

public LocalizedException(java.lang.String inMessageID)
Create with a message id, but no message parameters.

Parameters:
inMessageID - a message ID that identifies the localised user-readable message in UIStrings

LocalizedException

public LocalizedException(java.lang.String inMessageID,
                          java.lang.Object inMessageParameter)
Create with a message id and one message parameter.

Parameters:
inMessageID - a message ID that identifies the localised user-readable message in UIStrings
inMessageParameter - one parameter to be substituted in the message as MessageFormat

LocalizedException

public LocalizedException(java.lang.String inMessageID,
                          java.lang.Object[] inMessageParameters)
Create with a message id and message parameters.

Parameters:
inMessageID - a message ID that identifies the localised user-readable message in UIStrings
inMessageParameters - a set of parameters to be substituted in the message as MessageFormat
Method Detail

getLocalizedMessage

public final java.lang.String getLocalizedMessage()
Use the message as an ID to a message pattern in the UIStrings and use MessageFormat to format it with the message parameters.

Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
The localizedMessage value


Copyright © 2000-2002 The Scope Team. All Rights Reserved.