|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.Exceptions
Static utility methods for dealing with exceptions.
Constructor Summary | |
Exceptions()
|
Method Summary | |
static java.lang.Throwable |
getRootCause(java.lang.Throwable t)
The root cause of the given throwable. |
static java.lang.RuntimeException |
toThrowUnchecked(java.lang.Throwable t)
Throws the Throwable as an uncheched exception or
wraps it inside a RuntimeException to be thrown by the
caller. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Exceptions()
Method Detail |
public static java.lang.Throwable getRootCause(java.lang.Throwable t)
The root cause of the given throwable.
public static java.lang.RuntimeException toThrowUnchecked(java.lang.Throwable t)
Throws the Throwable
as an uncheched exception or
wraps it inside a RuntimeException
to be thrown by the
caller.
This method is intended to be used for translating checked exceptions to unchecked exceptions using code like this:
try {
// ...an operation that may throw a checked exception...
} catch (Exception e) {
throw toThrowUnchecked
(e);
}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |