Task
- When a duration fails to parse during ::modify, it must raise an exception, and not silently skip the attribute.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user