icerockdev / moko-errors

Automated exceptions handler for mobile (android & ios) Kotlin Multiplatform development.
https://moko.icerock.dev/
Apache License 2.0
52 stars 6 forks source link

Catching Throwable's #19

Closed Tetraquark closed 3 years ago

Tetraquark commented 3 years ago

In the current version of the library in ExceptionHandlerContextImpl to catch exceptions is used catch (e: Throwable) construction. Therefore, all possible exceptions are handled when the method execute is called. This method of exception handling can lead to undefined behavior, because e.g. OOM or CancellationException will be handled. So, we need to find a solution for such cases - do exceptions rethrow or something else.