public class ResourcedException extends java.lang.Exception 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 |
|---|
ResourcedException(java.lang.String tag)
Constructor for a simple I18n message.
|
ResourcedException(java.lang.String tag,
java.lang.Object... args)
Constructor for an I18n message with arguments.
|
ResourcedException(java.lang.Throwable originalException,
java.lang.String tag)
Constructor for a simple I18n message after receiving another exception.
|
ResourcedException(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.
|
static java.lang.String |
getUserMessage(java.lang.Throwable x)
Get a useful message from an exception.
|
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 ResourcedException(@NotNull java.lang.String tag)
tag - I18n resource tag of messageI18n.getString(String)public ResourcedException(@NotNull java.lang.String tag, java.lang.Object... args)
tag - I18n resource tag for a message with argumentsargs - argumentsI18n.format(String, Object...)public ResourcedException(@NotNull java.lang.Throwable originalException, @NotNull java.lang.String tag)
originalException - wrapped exceptiontag - I18n resource tag for a message with argumentsI18n.getString(String)public ResourcedException(@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 ResourcedThrowablegetMessage in class java.lang.Throwablepublic java.lang.String getMessage(java.util.Locale l)
getMessage in interface ResourcedThrowablel - requested localepublic java.lang.Throwable getOriginalException()
getOriginalException in interface ResourcedThrowablenull if there is no original
exceptionpublic final void setOriginalException(java.lang.Throwable originalException)
setOriginalException in interface ResourcedThrowableoriginalException - original exception