Package org.apache.curator.utils
Class ExceptionAccumulator
- java.lang.Object
-
- org.apache.curator.utils.ExceptionAccumulator
-
public class ExceptionAccumulator extends java.lang.ObjectUtility to accumulate multiple potential exceptions into one that is thrown at the end
-
-
Constructor Summary
Constructors Constructor Description ExceptionAccumulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Throwable e)Add an exception into the accumulated exceptions.voidpropagate()If there is an accumulated exception, throw it
-
-
-
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 isInterruptedExceptionthenThread.currentThread().interrupt()is called.- Parameters:
e- the exception
-
-