-
-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
Is your feature request related to a problem?
When suspendOnException
is triggered within the library, it unintentionally catches CancellationException
as a generic exception.
Since CancellationException is special in Kotlin coroutines, capturing it as a standard exception interferes with coroutine cancellation mechanisms, potentially causing coroutine leakages, unexpected continuation of work, or incorrect error reporting.
Describe the solution you'd like:
Modify the behavior of suspendOnException so that it re-throws the CancellationException
by default, preserving the intended coroutine cancellation semantics.
This ensures that coroutines can terminate correctly and exceptions are handled explicitly rather than being caught generically.
Metadata
Metadata
Assignees
Labels
No labels