From 4c9e4ce637ce201a874bfbeed5ac1611549ca812 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 21 Apr 2016 13:13:43 +0200 Subject: [PATCH] SMM: Log uncaught top level fiber exceptions as something has changed about how they propagate out of Fiber.unpark --- src/main/kotlin/core/messaging/StateMachineManager.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/core/messaging/StateMachineManager.kt b/src/main/kotlin/core/messaging/StateMachineManager.kt index 4d7cf45236..a91e8bd2cf 100644 --- a/src/main/kotlin/core/messaging/StateMachineManager.kt +++ b/src/main/kotlin/core/messaging/StateMachineManager.kt @@ -93,9 +93,9 @@ class StateMachineManager(val serviceHub: ServiceHub, val runInThread: Executor) ) init { - // Blank out the default uncaught exception handler because we always catch things ourselves, and the default - // just redundantly prints stack traces to the logs. - Fiber.setDefaultUncaughtExceptionHandler { fiber, throwable -> } + Fiber.setDefaultUncaughtExceptionHandler { fiber, throwable -> + (fiber as ProtocolStateMachine<*>).logger.error("Caught exception from protocol", throwable) + } restoreCheckpoints() }