Package org.elasticsearch.nio.utils
Class ExceptionsHelper
java.lang.Object
org.elasticsearch.nio.utils.ExceptionsHelper
public class ExceptionsHelper
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ExceptionsHelper() -
Method Summary
Modifier and Type Method Description static <T extends java.lang.Throwable>
voidrethrowAndSuppress(java.util.List<T> exceptions)Rethrows the first exception in the list and adds all remaining to the suppressed list.
-
Constructor Details
-
ExceptionsHelper
public ExceptionsHelper()
-
-
Method Details
-
rethrowAndSuppress
public static <T extends java.lang.Throwable> void rethrowAndSuppress(java.util.List<T> exceptions) throws T extends java.lang.ThrowableRethrows the first exception in the list and adds all remaining to the suppressed list. If the given list is empty no exception is thrown- Throws:
T extends java.lang.Throwable
-