stack overflow in scripts shouldn't crash the game, fixes #934
This commit is contained in:
1 parent
bf6fddd645
commit
8fa54c8146
3 files changed
+28
-6
No files matched your search
@@ -82,6 +82,10 @@ public class CarpetExpression
|
||||
{
|
||||
throw new CarpetExpressionException("Math doesn't compute... "+ae.getMessage(), null);
|
||||
}
|
||||
catch (StackOverflowError soe)
|
||||
{
|
||||
throw new CarpetExpressionException("Your thoughts are too deep", null);
|
||||
}
|
||||
}
|
||||
|
||||
public Value scriptRunCommand(ScriptHost host, BlockPos pos)
|
||||
@@ -115,5 +119,9 @@ public class CarpetExpression
|
||||
{
|
||||
throw new CarpetExpressionException("Math doesn't compute... "+ae.getMessage(), null);
|
||||
}
|
||||
catch (StackOverflowError soe)
|
||||
{
|
||||
throw new CarpetExpressionException("Your thoughts are too deep", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user