Package dev.nm.misc.parallel
Class MultipleExecutionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- dev.nm.misc.parallel.MultipleExecutionException
-
- All Implemented Interfaces:
Serializable
public class MultipleExecutionException extends Exception
This exception is thrown when any of the parallel tasks throws an exception during execution. This exception contains all the exceptions caught during execution.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultipleExecutionException(List<?> results, List<ExecutionException> exceptions)
Construct an exception with the (partial) results and all exceptions encountered during execution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ExecutionException>
getExceptions()
Get all exceptions encountered during execution.String
getMessage()
Gather the stack traces for the thrown exceptions.List<?>
getResults()
Get the results obtained so far.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MultipleExecutionException
public MultipleExecutionException(List<?> results, List<ExecutionException> exceptions)
Construct an exception with the (partial) results and all exceptions encountered during execution.- Parameters:
results
- the results obtained so farexceptions
- all exceptions encountered during execution
-
-
Method Detail
-
getResults
public List<?> getResults()
Get the results obtained so far.- Returns:
- the results
-
getExceptions
public List<ExecutionException> getExceptions()
Get all exceptions encountered during execution.- Returns:
- all exceptions encountered during execution
-
getMessage
public String getMessage()
Gather the stack traces for the thrown exceptions.- Overrides:
getMessage
in classThrowable
- Returns:
- the detailed messages of all the thrown exceptions
-
-