Fix coroutine exception handling

This commit is contained in:
js6pak committed 2021-07-07 20:41:30 +02:00
1 parent c009f5a7a2
commit fbe03ebac5
1 file changed
+2 -1
+2 -1
View File
@@ -343,8 +343,9 @@ namespace Reactor
}
catch (Exception e)
{
Logger<ReactorPlugin>.Error(e.ToString());
Logger<ReactorPlugin>.Error($"Exception in coroutine of type {enumerator?.GetType().AssemblyQualifiedName}: {e}");
Stop(FindOriginalCoroutine(enumerator)); // We want the entire coroutine hierarchy to stop when an error happen
return;
}
var next = enumerator.Current;