oracle.bali.share.util
Class UnhandledException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.RuntimeException
|
+--oracle.bali.share.util.UnhandledException
- All Implemented Interfaces:
- java.io.Serializable, WrappingThrowable
- public class UnhandledException
- extends java.lang.RuntimeException
- implements WrappingThrowable
RuntimeException class used for rethrowing any exception. In some cases, interfaces do not support throwing exceptions - and maintaining backwards compatibility prevents adding exceptions. Because of this, important exceptions - SQLExceptions, IOExceptions - are sometimes be dropped on the floor and never detected.
This class supports preserving these exceptions by wrapping them inside of a RuntimeException, which can be thrown from any location. In general, it should only be used inside of a parent container that will catch these exceptions and unwrap them.
(An example of this pattern is the UIX DataObject interface and the UIX TryBean. The TryBean can catch any exception, but DataObjects can only throw unchecked exceptions - RuntimeExceptions and Errors).
- See Also:
- Serialized Form
Constructor Summary |
UnhandledException(java.lang.Throwable rootCause)
Creates an UnhandledException with no detail message. |
UnhandledException(java.lang.Throwable rootCause, java.lang.String message)
Creates an UnhandledException with the specified detail message. |
Method Summary |
java.lang.Throwable |
getRootCause()
Returns the exception that originally caused this exception to be thrown. |
java.lang.String |
toString()
Converts to a string. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UnhandledException
public UnhandledException(java.lang.Throwable rootCause)
- Creates an UnhandledException with no detail message.
UnhandledException
public UnhandledException(java.lang.Throwable rootCause,
java.lang.String message)
- Creates an UnhandledException with the specified detail message.
getRootCause
public java.lang.Throwable getRootCause()
- Returns the exception that originally caused this exception to be thrown.
-
- Specified by:
getRootCause
in interface WrappingThrowable
toString
public java.lang.String toString()
- Converts to a string.
-
- Overrides:
toString
in class java.lang.Throwable