public abstract class AbstractLocalizableRTMException extends Exception implements RTMLocalizableThrowable
AbstractLocalizableRTMException
serves as an abstract base
class for checked, localizable RTM exceptions.Constructor and Description |
---|
AbstractLocalizableRTMException()
Constructs a new exception with
null as its detail message. |
AbstractLocalizableRTMException(LocalizableMessage localizableMessage)
Constructs a new exception with the specified localizable detail message.
|
AbstractLocalizableRTMException(LocalizableMessage localizableMessage,
Throwable cause)
Constructs a new exception with the specified localizable detail message and
cause.
|
AbstractLocalizableRTMException(LocalizableMessage localizableMessage,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace)
Constructs a new exception with the specified localizable detail message,
cause, suppression enabled or disabled, and writable stack
trace enabled or disabled.
|
AbstractLocalizableRTMException(Throwable cause)
Constructs a new exception with the specified cause and a localizable detail
message of (cause == null ? null : RTMThrowables.getLocalizableMessage(cause)) (which
typically contains the class and detail message of cause).
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Throwable> |
getJavaThrowableClass()
Some throwables only represent localizable versions of native Java throwables (e.g.
|
Locale |
getLocale()
Returns the currently set
Locale of this localizable exception |
LocalizableMessage |
getLocalizableMessage()
Returns the encapsulated
LocalizableMessage object carried by this throwable. |
String |
getMessage() |
void |
setLocale(Locale locale)
Sets the
Locale used to derive the localized message of the throwable. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AbstractLocalizableRTMException()
null
as its detail message.
The cause is not initialized, and may subsequently be initialized by a
call to Throwable.initCause(java.lang.Throwable)
.public AbstractLocalizableRTMException(LocalizableMessage localizableMessage, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
localizableMessage
- the localizable detail message.cause
- the cause. (A null
value is permitted,
and indicates that the cause is nonexistent or unknown.)enableSuppression
- whether or not suppression is enabled
or disabledwritableStackTrace
- whether or not the stack trace should
be writablepublic AbstractLocalizableRTMException(LocalizableMessage localizableMessage, Throwable cause)
Note that the detail message associated with
cause
is not automatically incorporated in
this exception's detail message.
localizableMessage
- the localizable detail message (which is saved for later retrieval
by the getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)public AbstractLocalizableRTMException(LocalizableMessage localizableMessage)
Throwable.initCause(java.lang.Throwable)
.localizableMessage
- the localizable detail message. The detail message is saved for
later retrieval by the getMessage()
method.public AbstractLocalizableRTMException(Throwable cause)
PrivilegedActionException
).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)public LocalizableMessage getLocalizableMessage()
RTMLocalizableThrowable
LocalizableMessage
object carried by this throwable.getLocalizableMessage
in interface RTMLocalizableThrowable
LocalizableMessage
object carried by this throwablepublic Locale getLocale()
Locale
of this localizable exceptionLocale
of this localizable exceptionpublic void setLocale(Locale locale)
RTMLocalizableThrowable
Locale
used to derive the localized message of the throwable.setLocale
in interface RTMLocalizableThrowable
locale
- the message Locale
to setpublic String getMessage()
getMessage
in class Throwable
public Class<? extends Throwable> getJavaThrowableClass()
RTMLocalizableThrowable
RTMIllegalArgumentException
). As throwable localization is currently bound
to the JVM that the server is running in, any such throwable is transformed into
the corresponding Java throwable. This method returns the Class
object
of this Java throwable.getJavaThrowableClass
in interface RTMLocalizableThrowable
Class
object of the Java throwable corresponding to this localizable throwable