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