Package org.jenkinsci.remoting.util
Class ThrowableUtils
java.lang.Object
org.jenkinsci.remoting.util.ThrowableUtils
Utility methods to help when working with
Throwable
instances.- Since:
- 3.0
-
Method Summary
-
Method Details
-
chain
@CheckForNull public static <T extends Throwable,T1 extends T, T chainT2 extends T> (@CheckForNull T1 e1, @CheckForNull T2 e2) Allows building a chain of exceptions.- Type Parameters:
T
- The widened return type.T1
- The type of first exception.T2
- The type of second exception.- Parameters:
e1
- The first exception (ornull
).e2
- The second exception (ornull
).- Returns:
- The first exception with the second added as a suppressed exception or the closest approximation to that.
-