Class ExceptionAccumulator


  • public class ExceptionAccumulator
    extends java.lang.Object
    Utility to accumulate multiple potential exceptions into one that is thrown at the end
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Throwable e)
      Add an exception into the accumulated exceptions.
      void propagate()
      If there is an accumulated exception, throw it
      • Methods inherited from class java.lang.Object

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

      • ExceptionAccumulator

        public ExceptionAccumulator()
    • Method Detail

      • propagate

        public void propagate()
        If there is an accumulated exception, throw it
      • add

        public void add​(java.lang.Throwable e)
        Add an exception into the accumulated exceptions. Note: if the exception is InterruptedException then Thread.currentThread().interrupt() is called.
        Parameters:
        e - the exception