Package com.suncode.pwfl
Class SystemException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.suncode.pwfl.SystemException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataSourceValidateException
,InvalidComponentException
Base system exception with i18n support.
- Author:
- RafaĆ Nowacki 2017-06-13
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSystemException
(String message) SystemException
(String message, Translator translator) SystemException
(String message, Throwable throwable) SystemException
(String message, Throwable throwable, Translator translator) -
Method Summary
Modifier and TypeMethodDescription<T> T
Returns translated message for end user.Returns message of exception.localizedMessage
(String key, Object... args) Sets variables to generate localized message when calling {getLocalizedMessage()
Sets a key and value property.toString()
static SystemException
static SystemException
wrap
(Throwable exception, Translator translator) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
SystemException
-
SystemException
-
SystemException
-
SystemException
-
-
Method Details
-
set
Sets a key and value property. All properties are returned when callinggetMessage()
.- Parameters:
key
- Key of propertyvalue
- Value of property- Returns:
- this
-
get
-
localizedMessage
Sets variables to generate localized message when calling {getLocalizedMessage()
- Parameters:
key
- Key for translated messageargs
- Arguments for message
-
getMessage
Returns message of exception. Message contains all properties.- Overrides:
getMessage
in classThrowable
-
getLocalizedMessage
Returns translated message for end user. Message must be set withlocalizedMessage(String, Object...)
.- Overrides:
getLocalizedMessage
in classThrowable
-
toString
-
wrap
-
wrap
-