summaryrefslogtreecommitdiff
path: root/gruel/src
diff options
context:
space:
mode:
authorJohnathan Corgan2011-09-27 10:32:41 -0700
committerJohnathan Corgan2011-09-27 10:32:41 -0700
commit21e9139fb2ec13ec38287b36d6399c12b00b37c6 (patch)
treea7540aaf25d3be99d2d07d43eaa09ef70f6fa31d /gruel/src
parente3b56bfd879f16c2fa1f284f330ed3df6a211ec1 (diff)
parentcb23b7a23ca8a1b1331e3d70e97425b1d52b2222 (diff)
downloadgnuradio-21e9139fb2ec13ec38287b36d6399c12b00b37c6.tar.gz
gnuradio-21e9139fb2ec13ec38287b36d6399c12b00b37c6.tar.bz2
gnuradio-21e9139fb2ec13ec38287b36d6399c12b00b37c6.zip
Merge branch 'master' into next
Diffstat (limited to 'gruel/src')
-rw-r--r--gruel/src/swig/pmt_swig.i18
1 files changed, 18 insertions, 0 deletions
diff --git a/gruel/src/swig/pmt_swig.i b/gruel/src/swig/pmt_swig.i
index 3b0eb45c8..34c7d4b7c 100644
--- a/gruel/src/swig/pmt_swig.i
+++ b/gruel/src/swig/pmt_swig.i
@@ -36,6 +36,24 @@
using namespace pmt;
%}
+////////////////////////////////////////////////////////////////////////
+// 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");
+ }
+
+}
+
// Template intrusive_ptr for Swig to avoid dereferencing issues
class pmt_base;
//%import <intrusive_ptr.i>