stack overflow in scripts shouldn't crash the game, fixes #934

This commit is contained in:
gnembon committed 2021-06-25 23:31:46 -03:00
1 parent bf6fddd645
commit 8fa54c8146
3 files changed
+28 -6

No files matched your search

@@ -461,6 +461,10 @@ public class ScriptCommand
{
host.handleErrorWithStack("Math doesn't compute", ae);
}
catch (StackOverflowError soe)
{
host.handleErrorWithStack("Your thoughts are too deep", soe);
}
return 0;
//host.resetErrorSnooper(); // lets say no need to reset the snooper in case something happens on the way
}