| | |
| | | { |
| | | private static final long serialVersionUID = -3527273444231560341L; |
| | | |
| | | private String formattedMsg = null; |
| | | |
| | | private Type type; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * The constructor of the ApplicationException. |
| | | * @param type the type of error we have. |
| | | * @param localizedMsg a localized string describing the problem. |
| | | * @param formattedMsg a localized message with extra formatting |
| | | * @param rootCause the root cause of this exception. |
| | | */ |
| | | public ApplicationException(Type type, String localizedMsg, |
| | | String formattedMsg, Throwable rootCause) |
| | | { |
| | | super(localizedMsg, rootCause); |
| | | this.formattedMsg = formattedMsg; |
| | | this.type = type; |
| | | } |
| | | |
| | | /** |
| | | * Returns the Type of this exception. |
| | | * @return the Type of this exception. |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets the localized message with extra formatting markup. |
| | | * @return String representing a formatted message. |
| | | */ |
| | | public String getFormattedMessage() { |
| | | return formattedMsg; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public String toString() |