- 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:
Paul Beckingham 2014-06-15 10:15:23 -04:00
parent 222c20f161
commit d2685a8212

View file

@ -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);