mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- If the a numeric attribute is modified with a result that is not readily convertible to a numeric value, then this is an error.
This commit is contained in:
parent
222c20f161
commit
d2685a8212
1 changed files with 5 additions and 0 deletions
|
@ -2052,6 +2052,11 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||
e.evaluateInfixExpression (value, v);
|
||||
context.debug (label + name + " <-- " + v.get_string () + " <-- " + value);
|
||||
|
||||
// If the result is not readily convertible to a numeric value,
|
||||
// then this is an error.
|
||||
if (v.type () == Variant::type_string)
|
||||
throw format (STRING_UDA_NUMERIC, v.get_string ());
|
||||
|
||||
v.cast (Variant::type_real);
|
||||
v.cast (Variant::type_string);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue