|
© 2002 BEA Systems, Inc. | ||||||||
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 | +--java.lang.RuntimeException | +--com.bea.p13n.exceptions.SystemException
An abstract base class designed to be extended by a given subsystem or service. It provides exception-chaining functionality that allows for printing a chained stack trace. The SystemException is the superclass of exceptions that can be thrown by the Java Virtal Machine during normal operation. This type of exception typically is not the result of a business logic failure. It is HIGHLY RECOMMENDED that subclasses provide the same constructors that are present in this class in order to maintain the highest degree of compatibility with this API, as well as the version of Throwable forthcoming in JDK 1.4. Although not enforced by this class, it is STRONGLY RECOMMENDED that the message argument set in the constructor originate from the WLS message catalog and not be hard-coded. For example:
public static final MySubsystemExceptionTextFormatter myFormatter = new MySubsystemExceptionTextFormatter(); . . throw new MySubsystemException ( myFormatter.MyExceptionMessage( arg0, arg1) ); Subclasses should contain data attributes pertaining to the failed condition such that a precise, meaningful message can be conveyed to the caller. A good check is to examine the exception message. If the message has placeholders representing application objects, those application objects should probably exist as attributes in the given exception class.
Constructor Summary | |
SystemException()
|
|
SystemException(java.lang.String message)
Constructor |
|
SystemException(java.lang.String message,
java.lang.Throwable t)
Constructor |
|
SystemException(java.lang.Throwable t)
Constructor |
Method Summary | |
java.lang.Throwable |
getCause()
Returns the embedded, or chained, exception |
void |
printStackTrace()
Designed to print the stack trace of this exception, as well as the exception it is chained to, if applicable. |
void |
printStackTrace(java.io.PrintStream out)
Designed to print the stack trace of this exception, as well as the exception it is chained to, if applicable. |
void |
printStackTrace(java.io.PrintWriter out)
Designed to print the stack trace of this exception, as well as the exception it is chained to, if applicable. |
java.lang.String |
toString()
Print a string representation of this exception and its embedded exceptions. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace,
getLocalizedMessage,
getMessage |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public SystemException()
public SystemException(java.lang.String message)
message
- String representing the Exception messagepublic SystemException(java.lang.String message, java.lang.Throwable t)
message
- String representing the Exception messaget
- Throwable object representing the wrapped or chained exceptionpublic SystemException(java.lang.Throwable t)
t
- Throwable object representing the wrapped or chained exceptionMethod Detail |
public java.lang.Throwable getCause()
public void printStackTrace(java.io.PrintStream out)
out
- PrintStream used to output the stack tracepublic void printStackTrace(java.io.PrintWriter out)
out
- PrintWriter used to output the stack tracepublic void printStackTrace()
public java.lang.String toString()
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |