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