From ad1dc807eab245be2f813ea533139b3862fe9cbf Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 14 May 2014 00:03:56 -0400 Subject: [PATCH] Context - Added special integer catch handler for hook terminations. --- src/Context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index 7285a8e8a..6cc592bea 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -232,6 +232,12 @@ int Context::initialize (int argc, const char** argv) rc = 2; } + catch (int) + { + // Hooks can terminate processing by throwing integers. + rc = 4; + } + catch (...) { error (STRING_UNKNOWN_ERROR);