|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.reuters.rc.db.DbBaseException
The DbBaseException class is used across all core services. It allows you to set a message with an exception, much like the normal java.lang.Exception class but in addition you can also carry along an original exception if you want. This is incorportated in the output from getMessage and toString(). The previous version of this class used to check if the string passed in was part of the MessageCatalog and if so, then use the associated key in creating the exception message. Various constructors were also provided to do string replacement on the exception message. This functionality is now removed. It is the responsibility of the creator of the exception to lookup message text directly from the MessageCatalog and pass it to the constructor of the exception. Implementation inspired from various placed, most recently Javaworld, Javatips #91. Java 1.4 now has this functionality.
Constructor Summary | |
DbBaseException()
Do nothing constructor. |
|
DbBaseException(java.lang.String message)
Creates a new DbBaseException instance with a given
message string. |
|
DbBaseException(java.lang.String message,
java.lang.Object[] inserts,
java.lang.Throwable rootCause)
Create a new DbBaseException instance. |
|
DbBaseException(java.lang.String message,
java.lang.Object insert,
java.lang.Throwable rootCause)
Create a new DbBaseException instance. |
|
DbBaseException(java.lang.String message,
java.lang.Throwable rootCause)
Create a new DbBaseException instance. |
|
DbBaseException(java.lang.Throwable rootCause)
Create an exception nesting the rootCause of this exception. |
Method Summary | |
static java.lang.String |
generateStackTraceString(java.lang.Throwable t)
|
java.lang.String |
getMessage()
Override Exceptin.getMessage to include information of the root causeo of the exception. |
java.lang.Throwable |
getRootCause()
Get the exception that caused this exception to be raised. |
java.lang.String |
getStackTraceString()
Return the stack trace including root cause exceptions. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream inPrintStream)
|
void |
printStackTrace(java.io.PrintWriter inPrintWriter)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DbBaseException()
public DbBaseException(java.lang.String message)
DbBaseException
instance with a given
message string.message
- a String
valuepublic DbBaseException(java.lang.Throwable rootCause)
rootCause
- a value of type 'Throwable'.public DbBaseException(java.lang.String message, java.lang.Throwable rootCause)
DbBaseException
instance. Allows for
an association of an originating exception.message
- Message to describe the exceptionrootCause
- The exceptio that caused this exception to be raised.public DbBaseException(java.lang.String message, java.lang.Object[] inserts, java.lang.Throwable rootCause)
DbBaseException
instance. Allows for
an association of an originating exception.message
- Message to describe the exceptioninserts
- an Object[]
valuerootCause
- The exceptio that caused this exception to be raised.public DbBaseException(java.lang.String message, java.lang.Object insert, java.lang.Throwable rootCause)
DbBaseException
instance. Allows for
an association of an originating exception.message
- Message to describe the exceptioninsert
- an Object
valuerootCause
- The exceptio that caused this exception to be raised.Method Detail |
public java.lang.Throwable getRootCause()
public java.lang.String getStackTraceString()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream inPrintStream)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter inPrintWriter)
printStackTrace
in class java.lang.Throwable
public static java.lang.String generateStackTraceString(java.lang.Throwable t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |