Eval
- Raises an exception if an expression evaluation yields an unexpected stack size at the end. This indicates that an expression like 'one two' was evaluated. Note that string field updates require evaluation, but this case occurs frequently.
This commit is contained in:
@@ -363,10 +363,10 @@ void Eval::evaluatePostfixStack (
|
||||
}
|
||||
}
|
||||
|
||||
// Should only be one value left on the stack.
|
||||
// If there is more than one variant left on the stack, then the original
|
||||
// expression was not valid.
|
||||
if (values.size () != 1)
|
||||
if (_debug)
|
||||
std::cout << "# Error: Unexpected stack size: " << values.size () << "\n";
|
||||
throw std::string ("The expression could not be evaluated.");
|
||||
|
||||
result = values[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user