You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is we do not handle CancellationException. In the catch block, the consumeException is called (the implementation)
Thus, alertFactory.unknownErrorAlert(closable, e = exception) line will be called. However, the cancellation event should not be the trigger for showing an alert
My proposition here at least do not call consumeException(e, templateKey) and errorIndicator?.postValue(true) if CancellationException has occurred, to avoid showing an unnecessary alert
Here is a code from repository LoginVM
The CancellationException should be re-thrown in a catch block when we use try-catch in coroutines.
Why?
Kotlin doc
Medium article
Florina Muntenescu's article - Cancellation in coroutines
The text was updated successfully, but these errors were encountered: