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>
    void
    rethrowAndSuppress​(java.util.List<T> exceptions)
    Rethrows the first exception in the list and adds all remaining to the suppressed list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • rethrowAndSuppress

      public static <T extends java.lang.Throwable> void rethrowAndSuppress​(java.util.List<T> exceptions) throws T extends java.lang.Throwable
      Rethrows 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