|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.bankframe.localization.BankFrameException
This class is the base class for all BankFrame exceptions. Instead of using java.lang.String for messages, it uses the com.bankframe.localization.BankFrameMessage class which represents a localizable string. This class can be instantiated by passing its constructor a BankFrameMessage or a sub-class of java.lang.Throwable. Using a sub-class of Throwable is termed exception chaining. See the JDK 1.4 documentation for more information on this topic. This class emulates the exception chaining functionality provided in JDK1.4 so that exception chaining can be used on earlier JDKs. Note that if the chained exception is not a sub-class of BankFrameException it may not be possible to provide a fully localised message since only BankFrameException sub-classes have support for per-user localisation.
Field Summary | |
static java.lang.String |
CHAINED_EXCEPTION_DIVIDER
|
static java.lang.String |
CHAINED_JAVA_EXCEPTION_MSG
|
static java.lang.String |
EXCEPTION_CLASS_NAME
|
static java.lang.String |
EXCEPTION_NAME
|
Constructor Summary | |
BankFrameException(BankFrameMessage message)
Constructor |
|
BankFrameException(BankFrameMessage message,
java.lang.Throwable cause)
Constructor Note that the detail message associated with cause is not automatically incorporated in this exception's detail message |
|
BankFrameException(java.lang.Throwable cause)
Constructor |
Method Summary | |
BankFrameMessage |
getBankFrameMessage()
This method gets the BankFrameMessage object |
java.lang.Throwable |
getCause()
Returns the cause of this Throwable or null if the cause is nonexistent or unknown. |
java.lang.String |
getMessage()
This method gets the error message as a localized String. |
java.lang.String |
getMessage(java.util.Locale locale)
This method gets the error message as a localized String. |
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Initializes the cause of this Throwable to the specified value. |
void |
printStackTrace()
Prints this throwable and its backtrace to the standard error stream; |
void |
printStackTrace(java.io.PrintStream s)
Prints this throwable and its backtrace to the standard error stream; |
void |
printStackTrace(java.io.PrintWriter s)
Prints this throwable and its backtrace to the standard error stream; |
DataPacket |
toDataPacket()
This method converts the exception to a DataPacket |
java.lang.String |
toString()
This method converts the exception to a String. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EXCEPTION_CLASS_NAME
public static final java.lang.String EXCEPTION_NAME
public static final java.lang.String CHAINED_JAVA_EXCEPTION_MSG
public static final java.lang.String CHAINED_EXCEPTION_DIVIDER
Constructor Detail |
public BankFrameException(BankFrameMessage message)
message
- The error message for the exceptionpublic BankFrameException(BankFrameMessage message, java.lang.Throwable cause)
message
- The error message for the exceptioncause
- The original cause of this BankFrameException. This parameter must
not be null.public BankFrameException(java.lang.Throwable cause)
cause
- The original cause of this BankFrameException. This parameter must
not be null.Method Detail |
public BankFrameMessage getBankFrameMessage()
public java.lang.Throwable getCause()
public java.lang.String getMessage()
getMessage(Locale locale)
instead.
public java.lang.String getMessage(java.util.Locale locale)
locale
- The locale to use for localizing the error message
public java.lang.Throwable initCause(java.lang.Throwable cause)
cause
- The original cause of the BankFrameException
public void printStackTrace()
public void printStackTrace(java.io.PrintStream s)
s
- The stream to print topublic void printStackTrace(java.io.PrintWriter s)
s
- The stream to print topublic DataPacket toDataPacket()
public java.lang.String toString()
getMessage(Locale locale)
to convert
the message to a localized String.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |