diff options
author | Josh Blum <josh@joshknows.com> | 2012-03-16 13:09:23 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-16 13:09:23 -0700 |
commit | f9a07338b9c7c0af19d64d24c47eaa9f7fe1ba38 (patch) | |
tree | eb2a0911c73c193cb0af6bff2bd2b9c9bdf8e84f /gnuradio-core/src/lib/swig | |
parent | 7e1ac13d5558eaca2233c4be4c41307b5e61b8f5 (diff) |
gruel: created common swig include file
This work taken from gruel_work_squashed
Common swig file includes:
* Language independent exception handler
* Wrapper for python calls that may block
Benefits:
* More common swig code, less copy pasta
* Wrapper for blocking python calls handles
the case where the call throws,
python is not left in a bad state
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio.i | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i index e365aeac7d..972d56c84d 100644 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ b/gnuradio-core/src/lib/swig/gnuradio.i @@ -25,23 +25,7 @@ // SWIG interface definition //////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// Language independent exception handler -//////////////////////////////////////////////////////////////////////// -%include exception.i - -%exception { - try { - $action - } - catch(std::exception &e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - catch(...) { - SWIG_exception(SWIG_RuntimeError, "Unknown exception"); - } - -} +%include <gruel_common.i> //////////////////////////////////////////////////////////////////////// // Headers |