Class ThrowableUtils
java.lang.Object
VASSAL.tools.ThrowableUtils
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Throwable>
TgetAncestor(Class<T> cl, Throwable t) Returns the most recentThrowableof classTin the proper causal history of the givenThrowable, if one exists.static <T extends Throwable>
TReturns the most recentThrowableof classTin the (not necessarily proper) causal history of the givenThrowable, if one exists.static StringgetStackTrace(Throwable thrown) static <T extends Throwable>
voidthrowAncestor(Class<T> cl, Throwable t) Throws the most recentThrowableof classTin the proper causal history of the givenThrowable, if one exists.static <T extends Throwable>
voidthrowRecent(Class<T> cl, Throwable t) Throws the most recentThrowableof classTin the (not necessarily proper) causal history of the givenThrowable, if one exists.
-
Method Details
-
getAncestor
-
getRecent
Returns the most recentThrowableof classTin the (not necessarily proper) causal history of the givenThrowable, if one exists. If the givenThrowableis of classT, it will be returned.- Parameters:
cl- theClassto search fort- theThrowableto check- Returns:
- the ancestor of class
T, ornullif none exists
-
throwAncestor
Throws the most recentThrowableof classTin the proper causal history of the givenThrowable, if one exists.- Parameters:
cl- theClassto search fort- theThrowableto check- Throws:
T- if an ancestor of that class is found
-
throwRecent
Throws the most recentThrowableof classTin the (not necessarily proper) causal history of the givenThrowable, if one exists.- Parameters:
cl- theClassto search fort- theThrowableto check- Throws:
T- if an ancestor of that class is found
-
getStackTrace
-