public class ResourcedRuntimeException extends java.lang.RuntimeException implements ResourcedThrowable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
args
The arguments for the resource.
|
protected java.lang.String |
resTag
The resource tag.
|
Constructor and Description |
---|
ResourcedRuntimeException(java.lang.String tag)
Constructor for a simple I18n message.
|
ResourcedRuntimeException(java.lang.String tag,
java.lang.Object... args)
Constructor for an I18n message with arguments.
|
ResourcedRuntimeException(java.lang.Throwable originalException,
java.lang.String tag)
Constructor for a simple I18n message after receiving another exception.
|
ResourcedRuntimeException(java.lang.Throwable originalException,
java.lang.String tag,
java.lang.Object... args)
Constructor for a I18n message with arguments after receiving another exception.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Get the message with default locale.
|
java.lang.String |
getMessage(java.util.Locale l)
Get the message for a locale.
|
java.lang.Throwable |
getOriginalException()
Get the exception from where this resourced exception originated.
|
void |
setOriginalException(java.lang.Throwable originalException)
Set the exception from where this resourced exception originated.
|
@NotNull protected final java.lang.String resTag
protected java.lang.Object[] args
public ResourcedRuntimeException(@NotNull java.lang.String tag)
tag
- I18n resource tag of messageI18n.getString(String)
public ResourcedRuntimeException(@NotNull java.lang.String tag, java.lang.Object... args)
tag
- I18n resource tag for a message with argumentsargs
- argumentsI18n.format(String, Object...)
public ResourcedRuntimeException(@NotNull java.lang.Throwable originalException, @NotNull java.lang.String tag)
originalException
- wrapped exceptiontag
- I18n resource tag for a message with argumentsI18n.getString(String)
public ResourcedRuntimeException(@NotNull java.lang.Throwable originalException, @NotNull java.lang.String tag, java.lang.Object... args)
originalException
- wrapped exceptiontag
- resource tagargs
- argumentsI18n.format(String, Object...)
public java.lang.String getMessage()
getMessage
in interface ResourcedThrowable
getMessage
in class java.lang.Throwable
public java.lang.String getMessage(java.util.Locale l)
getMessage
in interface ResourcedThrowable
l
- requested localepublic java.lang.Throwable getOriginalException()
getOriginalException
in interface ResourcedThrowable
null
if there is no original
exceptionpublic final void setOriginalException(java.lang.Throwable originalException)
setOriginalException
in interface ResourcedThrowable
originalException
- original exception