Package de.esoco.coroutine
Class CoroutineScopeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.util.concurrent.CompletionException
-
- de.esoco.coroutine.CoroutineException
-
- de.esoco.coroutine.CoroutineScopeException
-
- All Implemented Interfaces:
java.io.Serializable
public class CoroutineScopeException extends CoroutineException
A runtime exception that is thrown if one or moreCoroutineexecutions in aCoroutineScopefail with an exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CoroutineScopeException(java.lang.Throwable cause, java.util.Collection<Continuation<?>> failed)Creates a new instance from an explicit causing exception and optional continuations of failed coroutines.CoroutineScopeException(java.util.Collection<Continuation<?>> failed)Creates a new instance from the continuations of failed coroutines.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Continuation<?>>getFailedContinuations()Returns the failed continuations that caused this exception.
-
-
-
Constructor Detail
-
CoroutineScopeException
public CoroutineScopeException(java.util.Collection<Continuation<?>> failed)
Creates a new instance from the continuations of failed coroutines. The causing exception will be set to the error of the first element in the argument collection.- Parameters:
failed- The failed continuations
-
CoroutineScopeException
public CoroutineScopeException(java.lang.Throwable cause, java.util.Collection<Continuation<?>> failed)Creates a new instance from an explicit causing exception and optional continuations of failed coroutines.- Parameters:
cause- The causing exceptionfailed- The failed continuations (optional)
-
-
Method Detail
-
getFailedContinuations
public java.util.Collection<Continuation<?>> getFailedContinuations()
Returns the failed continuations that caused this exception. The actual error exceptions can be queried withContinuation.getError().- Returns:
- The continuation
-
-