org.chwf.i18n
Class MessageException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.chwf.i18n.MessageException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AuthenticationException, ControllerException, ConversionException, ParameterException

public class MessageException
extends java.lang.Exception

An internationalizable exception. It is intended for late initialization of locale. The message is stored in Message object, which has the exception class as its context class.

Author:
Paul Strack
See Also:
Serialized Form

Constructor Summary
MessageException(java.lang.String key, java.lang.Object[] arguments)
          Constructor for MessageException.
 
Method Summary
 java.lang.String getMessage()
          Get the formatted message (argument values inserted).
 java.lang.String toString()
          Exception name plus the message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageException

public MessageException(java.lang.String key,
                        java.lang.Object[] arguments)
Constructor for MessageException.

Parameters:
key - The key used for message lookup. If lookup fails, the key is used as the message pattern, following the rules of MessageFormat
arguments - The arguments for the pattern.
Method Detail

getMessage

public java.lang.String getMessage()
Get the formatted message (argument values inserted).

Overrides:
getMessage in class java.lang.Throwable
Returns:
The formatted message.

toString

public java.lang.String toString()
Exception name plus the message.

Overrides:
toString in class java.lang.Throwable
Returns:
The string value of the exception.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.