|
Carrot2 v3.5.2
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.ExceptionUtils
public final class ExceptionUtils
A number of utility classes for working with Throwables.
| Method Summary | ||
|---|---|---|
static String |
currentStackTrace()
Returns the current stack trace of the calling thread. |
|
static
|
wrapAs(Class<T> clazz,
Throwable t)
If t if an instance of clazz, then t is
returned. |
|
static RuntimeException |
wrapAsRuntimeException(Throwable t)
Calls wrapAs(Class, Throwable) with the first parameter set to
RuntimeException. |
|
| 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 wrapAs(Class<T> clazz,
Throwable t)
t if an instance of clazz, then t is
returned. Otherwise an instance of clazz is created using a
single-parameter constructor accepting t and the wrapper exception
instance is returned. If no matching constructor can be found, a
RuntimeException is returned.
clazz - The exception class to return (or wrap) t.t - Throwable instance to wrap.public static RuntimeException wrapAsRuntimeException(Throwable t)
wrapAs(Class, Throwable) with the first parameter set to
RuntimeException.
public static String currentStackTrace()
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||