- Correct handling for JSON and non-JSON output.
This commit is contained in:
Paul Beckingham 2014-08-09 20:19:02 -04:00
parent 2ea9b8786e
commit 9996e5adef

View file

@ -112,7 +112,10 @@ void Hooks::onLaunch ()
else
{
for (line = lines.begin (); line != lines.end (); ++line)
context.error (*line);
if (line->length () && (*line)[0] == '{')
; // Ignored
else
context.error (*line);
throw 0; // This is how hooks silently terminate processing.
}
@ -162,7 +165,10 @@ void Hooks::onExit ()
else
{
for (line = lines.begin (); line != lines.end (); ++line)
context.error (*line);
if (line->length () && (*line)[0] == '{')
; // Ignored
else
context.error (*line);
}
}
@ -225,7 +231,12 @@ void Hooks::onAdd (Task& after)
else
{
for (line = lines.begin (); line != lines.end (); ++line)
context.error (*line);
{
if (line->length () && (*line)[0] == '{')
; // Ignored
else
context.error (*line);
}
throw 0; // This is how hooks silently terminate processing.
}
@ -294,7 +305,10 @@ void Hooks::onModify (const Task& before, Task& after)
else
{
for (line = lines.begin (); line != lines.end (); ++line)
context.error (*line);
if (line->length () && (*line)[0] == '{')
; // Ignored
else
context.error (*line);
throw 0; // This is how hooks silently terminate processing.
}