common-util

local.tomas.i18n
Class LocalizedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by local.tomas.i18n.LocalizedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExpressionException

public abstract class LocalizedException
extends Exception

Base class for an exception with a language dependent message.

Author:
tomas.teubner
See Also:
Serialized Form

Constructor Summary
protected LocalizedException()
          Default constructor
protected LocalizedException(String message)
          Construct exception from message.
protected LocalizedException(String message, Object arg)
          Construct exception from message and a single message argument.
protected LocalizedException(String message, Object[] args)
          Construct exception from message and message arguments.
protected LocalizedException(String message, Object[] args, Throwable cause)
          Construct exception from message, message arguments and a cause.
protected LocalizedException(String message, Object arg, Throwable cause)
          Construct exception from message, a single message argument, and a cause.
protected LocalizedException(String message, Throwable cause)
          Construct exception from message and a cause.
protected LocalizedException(Throwable cause)
          Construct exception from a cause.
 
Method Summary
protected  Locale getLocale()
          Get locale.
 String getLocalizedMessage()
           
 String getMessage()
           
protected abstract  Messages getMessages()
           
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedException

protected LocalizedException(String message,
                             Object[] args)
Construct exception from message and message arguments.

Parameters:
message - message identifier
args - arguments for this message

LocalizedException

protected LocalizedException(String message,
                             Object[] args,
                             Throwable cause)
Construct exception from message, message arguments and a cause.

Parameters:
message - message identifier
args - arguments for this message
cause - throwable this excaption is caused by

LocalizedException

protected LocalizedException(String message)
Construct exception from message.

Parameters:
message - message identifier

LocalizedException

protected LocalizedException(String message,
                             Throwable cause)
Construct exception from message and a cause.

Parameters:
message - message identifier
cause - throwable this excaption is caused by

LocalizedException

protected LocalizedException(Throwable cause)
Construct exception from a cause.

Parameters:
cause - throwable this excaption is caused by

LocalizedException

protected LocalizedException()
Default constructor


LocalizedException

protected LocalizedException(String message,
                             Object arg)
Construct exception from message and a single message argument.

Parameters:
message - message identifier
arg - argument for this message

LocalizedException

protected LocalizedException(String message,
                             Object arg,
                             Throwable cause)
Construct exception from message, a single message argument, and a cause.

Parameters:
message - message identifier
arg - argument for this message
cause - throwable this excaption is caused by
Method Detail

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

toString

public String toString()
Overrides:
toString in class Throwable

getLocale

protected Locale getLocale()
Get locale.

Returns:
default locale

getMessages

protected abstract Messages getMessages()

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.