From d9222606e7b3d4a7f6fb69aa81ff28979975fec5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 19 Oct 2014 01:47:33 -0400 Subject: [PATCH] Hooks - The on-exit hook can now terminate processing. --- src/Hooks.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index fae18909f..065c48466 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -203,6 +203,9 @@ void Hooks::onExit () context.error (*line); } } + + if (status) + throw 0; // This is how hooks silently terminate processing. } } @@ -243,7 +246,6 @@ void Hooks::onAdd (std::vector & tasks) int status = callHookScript (*script, input, output); input.clear (); - std::vector ::iterator line; for (line = output.begin (); line != output.end (); ++line) {