Commit 564001ba authored by Lingxi-Li's avatar Lingxi-Li Committed by Dominik Charousset

Fix exception handling in `local_actor::resume()`

The previous version does not correctly handle the case when the call
to `self->act()` throws an exception that is not successfully handled
by the call to `self->handle(eptr)`
parent e46ef38e
...@@ -650,7 +650,8 @@ resumable::resume_result local_actor::resume(execution_unit* eu, ...@@ -650,7 +650,8 @@ resumable::resume_result local_actor::resume(execution_unit* eu,
} }
if (eptr) { if (eptr) {
auto opt_reason = self->handle(eptr); auto opt_reason = self->handle(eptr);
rsn = *opt_reason; rsn = opt_reason ? *opt_reason
: exit_reason::unhandled_exception;
} }
self->planned_exit_reason(rsn); self->planned_exit_reason(rsn);
try { try {
......
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