- 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:
Paul Beckingham 2014-06-15 09:32:17 -04:00
parent 5b2505f6da
commit b7d668fb7d

View file

@ -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];
}