summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-01 14:02:18 -0300
committerGitHub <noreply@github.com>2018-11-01 14:02:18 -0300
commit34426be9a0ef904c5cb106ae6bbea6511ed79fda (patch)
tree93f291cc6a5cb5884edeb36e88ce290c74f6bc21 /core
parent74d895425d94334fe5a027c5534d5b60c2bbe0bc (diff)
parentb0df0b46ac356f88639a6a195ab62fd1e6aaf57f (diff)
Merge pull request #23346 from santouits/you-shall-not-execute
Error running Expression.execute after parse error
Diffstat (limited to 'core')
-rw-r--r--core/math/expression.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index a16267cf0a..0cfb54234c 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -2120,6 +2120,10 @@ Error Expression::parse(const String &p_expression, const Vector<String> &p_inpu
}
Variant Expression::execute(Array p_inputs, Object *p_base, bool p_show_error) {
+ if (error_set) {
+ ERR_EXPLAIN("There was previously a parse error: " + error_str);
+ ERR_FAIL_V(Variant());
+ }
execution_error = false;
Variant output;