- When a duration fails to parse during ::modify, it must raise an exception,
  and not silently skip the attribute.
This commit is contained in:
Paul Beckingham 2014-06-15 23:34:43 -04:00
parent 64c9cbe943
commit ef3deaad4a

View file

@ -2034,8 +2034,6 @@ void Task::modify (modType type, bool text_required /* = false */)
{
// The duration is stored in raw form, but it must still be valid,
// and therefore is parsed first.
try
{
Eval e;
e.addSource (domSource);
e.addSource (namedDates);
@ -2050,9 +2048,8 @@ void Task::modify (modType type, bool text_required /* = false */)
set (name, value);
++modCount;
}
}
catch (...) { /* NOP */ }
else
throw format ("The duration value '{1}' is not supported.", value);
}
// Need handling for numeric types, used by UDAs.