mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
64c9cbe943
commit
ef3deaad4a
1 changed files with 14 additions and 17 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue