https://kotlinlang.org logo
#coroutines
Title
# coroutines
m

Marcin Wisniowski

05/02/2021, 3:52 PM
How do I get usable stack traces for exceptions in coroutines? I'm using a crash reporting service, but all the exceptions I'm getting lose all context, since they only have the function the exception happened in, and that's it, since the next element of the stack trace is
BaseContinuationImpl.resumeWith
and the rest of coroutines machinery, not the "actual" calling method.
l

louiscad

05/02/2021, 8:21 PM
Do you have parts of your code that use
offer
with catching the exceptions it might throw?
m

Marcin Wisniowski

05/03/2021, 12:46 PM
I do, but the problem is not exclusive to them.
u

ursus

05/26/2021, 12:44 PM
I used to have somewhat similar problem in rx, and I just trimmed those lines from stacktrace and it worked decent
7 Views