SMM: Log uncaught top level fiber exceptions as something has changed about how they propagate out of Fiber.unpark

This commit is contained in:
Mike Hearn 2016-04-21 13:13:43 +02:00
parent 3ef6f18203
commit 4c9e4ce637

View File

@ -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()
}