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

Add reference to ExceptionHandler in HandlerResult #9

Open Tetraquark opened 3 years ago

Tetraquark commented 3 years ago

It will be useful if HandlerResult will contains reference to parent ExceptionHandler that allow to create useful extension like next to build chains:

val lastExecutionResult = exceptionHandler.handle {
    repository.request1()
}.execute()
.next {
    repository.request2()
}.catch<IllegalStateException> {
    false
}.execute()