Improved error handling when exceptions occur during suspend.

This commit is contained in:
Clinton Alexander 2016-07-20 11:50:23 +01:00
parent 97c001dc61
commit 40a4623c51

View File

@ -109,9 +109,10 @@ class ProtocolStateMachineImpl<R>(val logic: ProtocolLogic<R>,
try { try {
suspendAction(with) suspendAction(with)
} catch (t: Throwable) { } catch (t: Throwable) {
// Do not throw exception again - Quasar completely bins it.
logger.warn("Captured exception which was swallowed by Quasar", t) logger.warn("Captured exception which was swallowed by Quasar", t)
// TODO to throw or not to throw, that is the question actionOnEnd()
throw t _resultFuture?.setException(t)
} }
} }
} }