mazz.i18n.exception
Class LocalizedRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by mazz.i18n.exception.LocalizedRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class LocalizedRuntimeException
extends java.lang.RuntimeException

A generic runtime exception that provides localized messages.

Version:
$Revision: 1.1 $
Author:
John Mazzitelli
See Also:
Msg, Serialized Form

Constructor Summary
LocalizedRuntimeException()
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.util.Locale locale, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(Msg.BundleBaseName bundle, java.util.Locale locale, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(Msg.BundleBaseName bundle, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(Msg msg)
          Constructor for LocalizedRuntimeException that explicitly takes the localized message.
LocalizedRuntimeException(java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.lang.Throwable cause)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.lang.Throwable cause, java.util.Locale locale, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.lang.Throwable cause, Msg.BundleBaseName bundle, java.util.Locale locale, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.lang.Throwable cause, Msg.BundleBaseName bundle, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
LocalizedRuntimeException(java.lang.Throwable cause, Msg msg)
          Constructor for LocalizedRuntimeException that explicitly takes the localized message.
LocalizedRuntimeException(java.lang.Throwable cause, java.lang.String key, java.lang.Object... varargs)
          Constructor for LocalizedRuntimeException.
 
Method Summary
 java.lang.String getLocalizedMessage()
          This will return the localized message if one exists, otherwise, delegates to the superclass's getMessage().
 java.lang.String getMessage()
          This will return the localized message if one exists, otherwise, delegates to the superclass.
 java.lang.String getStackTraceString()
          Convenience method that returns the stack trace as a String.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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

LocalizedRuntimeException

public LocalizedRuntimeException()
Constructor for LocalizedRuntimeException.


LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause)
Constructor for LocalizedRuntimeException.

Parameters:
cause -

LocalizedRuntimeException

public LocalizedRuntimeException(Msg.BundleBaseName bundle,
                                 java.util.Locale locale,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
bundle - the basename of the resource bundle where the localized message can be found
locale - the locale used to determine the specified resource bundle to use
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.util.Locale locale,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
locale - the locale used to determine the specified resource bundle to use
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(Msg.BundleBaseName bundle,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
bundle - the basename of the resource bundle where the localized message can be found
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(Msg msg)
Constructor for LocalizedRuntimeException that explicitly takes the localized message.

Parameters:
msg - the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause,
                                 Msg.BundleBaseName bundle,
                                 java.util.Locale locale,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
cause -
bundle - the basename of the resource bundle where the localized message can be found
locale - the locale used to determine the specified resource bundle to use
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause,
                                 java.util.Locale locale,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
cause -
locale - the locale used to determine the specified resource bundle to use
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause,
                                 Msg.BundleBaseName bundle,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
cause -
bundle - the basename of the resource bundle where the localized message can be found
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause,
                                 java.lang.String key,
                                 java.lang.Object... varargs)
Constructor for LocalizedRuntimeException.

Parameters:
cause -
key - the key into the resource bundle to identify the specific message to get
varargs - optional arguments to help fill in the localized message

LocalizedRuntimeException

public LocalizedRuntimeException(java.lang.Throwable cause,
                                 Msg msg)
Constructor for LocalizedRuntimeException that explicitly takes the localized message.

Parameters:
cause -
msg - the localized message
Method Detail

getMessage

public java.lang.String getMessage()
This will return the localized message if one exists, otherwise, delegates to the superclass.

Overrides:
getMessage in class java.lang.Throwable
See Also:
Throwable.getMessage()

getLocalizedMessage

public java.lang.String getLocalizedMessage()
This will return the localized message if one exists, otherwise, delegates to the superclass's getMessage().

Overrides:
getLocalizedMessage in class java.lang.Throwable
See Also:
Throwable.getLocalizedMessage()

getStackTraceString

public java.lang.String getStackTraceString()
Convenience method that returns the stack trace as a String.

Returns:
stack trace


Copyright © 2006 John J. Mazzitelli All Rights Reserved. Licensed under LGPL