@Api public class SystemException extends RuntimeException
| Constructor and Description |
|---|
SystemException(String message) |
SystemException(String message,
Throwable throwable) |
SystemException(String message,
Throwable throwable,
Translator translator) |
SystemException(String message,
Translator translator) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(String key) |
String |
getLocalizedMessage()
Returns translated message for end user.
|
String |
getMessage()
Returns message of exception.
|
SystemException |
localizedMessage(String key,
Object... args)
Sets variables to generate localized message when calling {
getLocalizedMessage() |
SystemException |
set(String key,
Object value)
Sets a key and value property.
|
String |
toString() |
static SystemException |
wrap(Throwable exception) |
static SystemException |
wrap(Throwable exception,
Translator translator) |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic SystemException(String message)
public SystemException(String message, Translator translator)
public SystemException(String message, Throwable throwable, Translator translator)
public SystemException set(String key, Object value)
getMessage().key - Key of propertyvalue - Value of propertypublic <T> T get(String key)
public SystemException localizedMessage(String key, Object... args)
getLocalizedMessage()key - Key for translated messageargs - Arguments for messagepublic String getMessage()
getMessage in class Throwablepublic String getLocalizedMessage()
localizedMessage(String, Object...).getLocalizedMessage in class Throwablepublic static SystemException wrap(Throwable exception)
public static SystemException wrap(Throwable exception, Translator translator)
Copyright © 2023 Suncode. All rights reserved.