Jacob
05/22/2023, 9:08 PMkevin.cianfarini
05/22/2023, 9:16 PMkevin.cianfarini
05/22/2023, 9:17 PMDeferred
is a job, though, so 🤷Casey Brooks
05/22/2023, 9:21 PMdeferred.await()
is called, rather than the async { }
function call itself.Jacob
05/22/2023, 9:27 PMCasey Brooks
05/22/2023, 9:41 PMThe result of the deferred is available when it is completed and can be retrieved by await method, which throws an exception if the deferred had failed.It should still cancel the parent, but the exception thrown from the coroutine should be captured within the deferred and only thrown through
deferred.await()
. This is in contrast to launch
which directly sends the captured exception to the CoroutineExceptionHandler
Jacob
05/22/2023, 9:52 PMJacob
05/22/2023, 10:07 PMPatrick Steiger
05/23/2023, 1:10 AM