mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
5b2505f6da
commit
b7d668fb7d
1 changed files with 3 additions and 3 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue