public class BusinessException extends Exception implements MessageParam
Exception to be used inside business logic. If one of the constructors is used that take a
messageKey-argument, it's easy to create a user-friendly error message.MessageParam,
Serialized Form| Constructor and Description |
|---|
BusinessException(String exceptionMessage) |
BusinessException(String exceptionMessage,
String messageKey,
Object... messageArgs) |
BusinessException(String exceptionMessage,
Throwable cause) |
BusinessException(String exceptionMessage,
Throwable cause,
String messageKey,
Object... messageArgs) |
BusinessException(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
getMessageArgs()
Returns the arguments for this message in order to be used with
MessageFormat.format(String, Object...) |
String |
getMessageKey()
Returns the key for the message in order to retrieve the real message from a
ResourceBundle. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic BusinessException(String exceptionMessage, String messageKey, Object... messageArgs)
public BusinessException(String exceptionMessage, Throwable cause, String messageKey, Object... messageArgs)
public BusinessException(String exceptionMessage)
public BusinessException(Throwable cause)
public String getMessageKey()
MessageParamResourceBundle.getMessageKey in interface MessageParamResourceBundle.getString(String)public Object[] getMessageArgs()
MessageParamMessageFormat.format(String, Object...)getMessageArgs in interface MessageParamCopyright © 2011–2018 aiticon GmbH. All rights reserved.