Hi, I am not able to see proper stacktrace and lin...
# arrow
s
Hi, I am not able to see proper stacktrace and line numbers when a runtime exception is thrown in an
effect
block. I get something like
Copy code
at foo.bar.BookService$bookReservation$suspendImpl$$inlined$invoke$1.invokeSuspend(Effect.kt:44) ~[main/:?]
at foo.bar.BookService$bookReservation$suspendImpl$$inlined$invoke$1.invoke(Effect.kt) ~[main/:?]
at foo.bar.BookService$bookReservation$suspendImpl$$inlined$invoke$1.invoke(Effect.kt) ~[main/:?]
at arrow.continuations.generic.SuspendMonadContinuation.startCoroutineUninterceptedOrReturn(SuspendingComputation.kt:89) ~[arrow-continuations-jvm-1.0.1.jar:?]
at arrow.continuations.Reset.suspended(Reset.kt:27) ~[arrow-continuations-jvm-1.0.1.jar:?]
at foo.bar.BookService.bookReservation$suspendImpl(BookService.kt:104) ~[main/:?]
Line number 104 does not even exist... Edit: Same as https://github.com/arrow-kt/arrow/issues/2647
s
I replied in the comments with an idea, but not sure that would actually fix the situation. This is code generated by the Kotlin compiler, and not sure if we can do something about it inside Arrow. It's an issue inherited by the Kotlin compiler afaik. https://discuss.kotlinlang.org/t/kotlin-coroutines-stack-trace-problem/23847/3 There are some community work arounds that you can use but haven't tested. https://github.com/Anamorphosee/stacktrace-decoroutinator
s
I see. Thats too bad that its inherent to coroutines. 😞 Hopefully it gets fixed at the source someday..
🤞 2