|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.sharedutil.Exceptions
public final class Exceptions
Utility methods for working with Exceptions.
| Method Summary | ||
|---|---|---|
static String |
getStackTrace()
Returns the caller's stack trace, in the typical format. |
|
static
|
initCause(T exception,
Throwable cause)
Returns the given exception with its cause initialized. |
|
static void |
throwUnchecked(Throwable exception)
Throws an unchecked exception. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T extends Throwable> T initCause(T exception,
Throwable cause)
T - the type of the parent exceptionexception - the exception to initializecause - the cause
IllegalArgumentException - if an attempt is made to set
an exception as its own cause
IllegalStateException - if the exception has already had
its cause initializedThrowable.initCause(Throwable)public static String getStackTrace()
public static void throwUnchecked(Throwable exception)
RuntimeException or an Error. This method always throws an
exception.
exception - the exception to throw
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||