From 3cfbdf0e60c94733c0a79e94bdf8627afc6bb2a4 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 21 Sep 2010 21:48:41 +0000 Subject: QMFv2 Additions: - QMFv2 schema encoding completed - Schema queries handled by the agent and initiated by the console by user request - Full query support with predicates evaluated on the agent (regex not yet implemented) - Agent filtering in the console - Agent aging in the console - Unit tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@999662 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qmf2/python/python.i | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpp/bindings/qmf2/python/python.i') diff --git a/cpp/bindings/qmf2/python/python.i b/cpp/bindings/qmf2/python/python.i index 7d83465bb3..02dd1632b0 100644 --- a/cpp/bindings/qmf2/python/python.i +++ b/cpp/bindings/qmf2/python/python.i @@ -23,13 +23,16 @@ /* Define the general-purpose exception handling */ %exception { + std::string error; + Py_BEGIN_ALLOW_THREADS; try { - Py_BEGIN_ALLOW_THREADS $action - Py_END_ALLOW_THREADS + } catch (qpid::types::Exception& ex) { + error = ex.what(); } - catch (qpid::types::Exception& ex) { - PyErr_SetString(PyExc_RuntimeError, ex.what()); + Py_END_ALLOW_THREADS; + if (!error.empty()) { + PyErr_SetString(PyExc_RuntimeError, error.c_str()); return NULL; } } -- cgit v1.2.1