Class ExceptionsHelper


  • public class ExceptionsHelper
    extends java.lang.Object
    • 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 Detail

      • ExceptionsHelper

        public ExceptionsHelper()
    • Method Detail

      • 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