Package org.marketcetera.util.except
Interface I18NThrowable
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
I18NError,I18NException,I18NInterruptedException,I18NInterruptedRuntimeException,I18NRuntimeException,SessionExpiredException,SessionRequiredException
public interface I18NThrowable extends Serializable
An internationalized throwable. At creation, the message may be set; upon message retrieval,getMessage()andgetLocalizedMessage()behave exactly as mandated byThrowable, and as implemented by JDK throwables.getDetail()andgetLocalizedDetail()return a raw and localized message respectively that includes both the receiver's message as well as the associated message of the underlying cause (both combined; or either one; or null, if none is set). A raw message comprises the provider, message, and entry IDs, as well as the message parameters; a localized message is looked up via a message's associated provider.- Since:
- 0.5.0
- Version:
- $Id: I18NThrowable.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- tlerios@marketcetera.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ThrowablegetCause()Returns the receiver's underlying cause, as implemented byThrowable.getCause().StringgetDetail()Returns the receiver's raw message, possibly combined with the raw message of the receiver's underlying cause.I18NBoundMessagegetI18NBoundMessage()Returns the receiver's message.StringgetLocalizedDetail()Returns the receiver's localized message, possibly combined with the localized message of the receiver's underlying cause.StringgetLocalizedMessage()Returns the receiver's localized message, as implemented byThrowable.getLocalizedMessage().StringgetMessage()Returns the receiver's raw message, as implemented byThrowable.getMessage().
-
-
-
Method Detail
-
getMessage
String getMessage()
Returns the receiver's raw message, as implemented byThrowable.getMessage().- Returns:
- The message. It may be null.
-
getLocalizedMessage
String getLocalizedMessage()
Returns the receiver's localized message, as implemented byThrowable.getLocalizedMessage().- Returns:
- The message. It may be null.
-
getCause
Throwable getCause()
Returns the receiver's underlying cause, as implemented byThrowable.getCause().- Returns:
- The cause. It may be null.
-
getDetail
String getDetail()
Returns the receiver's raw message, possibly combined with the raw message of the receiver's underlying cause.- Returns:
- The message. It may be null if there is no raw message for the receiver, and no underlying cause message.
-
getLocalizedDetail
String getLocalizedDetail()
Returns the receiver's localized message, possibly combined with the localized message of the receiver's underlying cause.- Returns:
- The message. It may be null if there is no localized message for the receiver, and no underlying localized cause message.
-
getI18NBoundMessage
I18NBoundMessage getI18NBoundMessage()
Returns the receiver's message.- Returns:
- The message. It may be null.
-
-