Commit 0f1e9a3d authored by Him188's avatar Him188

Make log clear

parent 5ceaebca
......@@ -44,8 +44,9 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
override val coroutineContext: CoroutineContext =
coroutineContext + NetworkDispatcher + CoroutineExceptionHandler { _, e ->
bot.logger.error("An exception was thrown in a coroutine under TIMBotNetworkHandler", e)
coroutineContext + NetworkDispatcher + CoroutineExceptionHandler { context, e ->
bot.logger.error("An exception was thrown in ${context[CoroutineName]?.let { "coroutine $it" }
?: "an unnamed coroutine"} under TIMBotNetworkHandler", e)
} + supervisor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment