Class FirstException<T extends Throwable>


  • public class FirstException<T extends Throwable>
    extends Object
    Remembers the first reported exception so that it can be rethrown later.
    • Constructor Detail

      • FirstException

        public FirstException()
    • Method Detail

      • setIfFirst

        public void setIfFirst​(T e)
        Remembers the exception if none was reported so far.
      • throwIfPresent

        public void throwIfPresent()
                            throws T extends Throwable
        Throws the exception if one is present.
        Throws:
        T extends Throwable