org.tigris.scarab.util
Class ScarabRuntimeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.tigris.scarab.util.ScarabRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class ScarabRuntimeException
extends java.lang.RuntimeException

This class extends TurbineException and does not change its functionality. It should be used to mark Scarab specific exceptions. In order to ensure localization of Exception messages, ScarabRuntimeException adds a new type of message, the L10NMessage.

Version:
$Id: ScarabRuntimeException.java 9977 2005-12-09 00:40:59Z hair $
Author:
John D. McNally
See Also:
Serialized Form

Field Summary
(package private)  Localizable l10nMessage
          The exception message in non-localized form.
(package private)  java.lang.Throwable nested
          Placeholder for a nested exception (may be null)
 
Fields inherited from class java.lang.RuntimeException
 
Constructor Summary
ScarabRuntimeException(Localizable theL10nInstance)
          Constructs a new ScarabRuntimeException with specified Localizable .
ScarabRuntimeException(Localizable theL10nInstance, java.lang.Throwable aNested)
          Constructs a new ScarabRuntimeException with specified Localizable and a nested Throwable.
ScarabRuntimeException(LocalizationKey theKey)
          Constructs a new ScarabRuntimeException with specified resource and no parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Object p1)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource and one parameter.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Object[] theParams)
          Constructs a new ScarabRuntimeException with specified resource and a list of parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Object p1, java.lang.Object p2)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource and two parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource and three parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Throwable aNested)
          Constructs a new ScarabRuntimeException with specified resource and a nested Throwable.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Throwable nested, java.lang.Object p1)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and one parameter.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Throwable nested, java.lang.Object[] theParams)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and an aritrary set of parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Throwable nested, java.lang.Object p1, java.lang.Object p2)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and two parameters.
ScarabRuntimeException(LocalizationKey theKey, java.lang.Throwable nested, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and three parameters.
 
Method Summary
 Localizable getL10nMessage()
          return the L10NInstance, or null, if no L10N key was given.
 java.lang.String getMessage()
          return the localized message in english.
 java.lang.String getMessage(ScarabLocalizationTool l10n)
          Deprecated. Does not follow core java patterns. Use setLocalizer(..) then getLocalizedMessage() instead.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

l10nMessage

Localizable l10nMessage
The exception message in non-localized form. Further infos, see the getmessage methods below.


nested

java.lang.Throwable nested
Placeholder for a nested exception (may be null)

Constructor Detail

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey)
Constructs a new ScarabRuntimeException with specified resource and no parameters.

Parameters:
theKey - the l10n error key.

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Throwable aNested)
Constructs a new ScarabRuntimeException with specified resource and a nested Throwable.

Parameters:
theKey - the l10n error key.
aNested -

ScarabRuntimeException

public ScarabRuntimeException(Localizable theL10nInstance)
Constructs a new ScarabRuntimeException with specified Localizable .

Parameters:
theL10nInstance - the l10n error key.

ScarabRuntimeException

public ScarabRuntimeException(Localizable theL10nInstance,
                              java.lang.Throwable aNested)
Constructs a new ScarabRuntimeException with specified Localizable and a nested Throwable.

Parameters:
theL10nInstance - the l10n error key.
aNested -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Object[] theParams)
Constructs a new ScarabRuntimeException with specified resource and a list of parameters.

Parameters:
theParams -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Object p1)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource and one parameter.

Parameters:
p1 -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Object p1,
                              java.lang.Object p2)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource and two parameters.

Parameters:
p1 -
p2 -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Object p1,
                              java.lang.Object p2,
                              java.lang.Object p3)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource and three parameters.

Parameters:
p1 -
p2 -
p3 -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Throwable nested,
                              java.lang.Object[] theParams)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and an aritrary set of parameters.

Parameters:
theKey -
nested -
theParams -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Throwable nested,
                              java.lang.Object p1)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and one parameter.

Parameters:
theKey -
nested -
p1 -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Throwable nested,
                              java.lang.Object p1,
                              java.lang.Object p2)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and two parameters.

Parameters:
theKey -
nested -
p1 -
p2 -

ScarabRuntimeException

public ScarabRuntimeException(LocalizationKey theKey,
                              java.lang.Throwable nested,
                              java.lang.Object p1,
                              java.lang.Object p2,
                              java.lang.Object p3)
convenience constructor: Constructs a new ScarabRuntimeException with specified resource, nested Throwable and three parameters.

Parameters:
theKey -
nested -
p1 -
p2 -
p3 -
Method Detail

getL10nMessage

public Localizable getL10nMessage()
return the L10NInstance, or null, if no L10N key was given.

Returns:

getMessage

public java.lang.String getMessage(ScarabLocalizationTool l10n)
Deprecated. Does not follow core java patterns. Use setLocalizer(..) then getLocalizedMessage() instead.

return the localized message by use of the given ScarabLocalizationTool. For further infos see getMessage

Parameters:
l10n -
Returns:

getMessage

public java.lang.String getMessage()
return the localized message in english. Note: It is preferrable to use getMessage

Returns:
localized english text


Copyright © 2000-2004 Tigris.org. All Rights Reserved.