public class EBaseException
extends java.lang.Exception
MessageFormat
,
BaseResources
,
Serialized FormModifier and Type | Field and Description |
---|---|
java.lang.Object[] |
mParams
Parameters to the exception error message.
|
Constructor and Description |
---|
EBaseException(java.lang.String msgFormat)
Constructs an instance of this exception with the given resource key.
|
EBaseException(java.lang.String msgFormat,
java.lang.Exception param)
Constructs an instance of the exception given the resource key and
a exception parameter.
|
EBaseException(java.lang.String msgFormat,
java.lang.Object[] params)
Constructs an instance of this exception given the resource key and
an array of parameters.
|
EBaseException(java.lang.String msgFormat,
java.lang.String param)
Constructs an instance of this exception with the given resource key
and a parameter as a string.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getBundleName()
Returns the given resource bundle name.
|
java.lang.Object[] |
getParameters()
Returns the list of parameters.
|
java.lang.String |
toString()
Returns the exception string in the default locale.
|
java.lang.String |
toString(java.util.Locale locale)
Returns the exception string in the given locale.
|
public EBaseException(java.lang.String msgFormat)
new EBaseException(BaseResources.PERMISSION_DENIED); new EBaseException("An plain error message");
msgFormat
- The error message resource key.public EBaseException(java.lang.String msgFormat, java.lang.String param)
new EBaseException(BaseResource.NO_CONFIG_FILE, fileName);
msgFormat
- exception details in message string formatparam
- message string parameterpublic EBaseException(java.lang.String msgFormat, java.lang.Exception param)
try { ... } catch (IOExeption e) { throw new EBaseException(BaseResources.INTERNAL_ERROR_1, e); }
msgFormat
- The resource keyparam
- The parameter as an exceptionpublic EBaseException(java.lang.String msgFormat, java.lang.Object[] params)
msgFormat
- The resource keyparams
- Array of paramspublic java.lang.Object[] getParameters()
public java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.String toString(java.util.Locale locale)
locale
- The localeprotected java.lang.String getBundleName()