summaryrefslogtreecommitdiff
path: root/gruel/src/swig/pmt_swig.i
diff options
context:
space:
mode:
authorJosh Blum2011-09-28 23:03:30 -0700
committerJosh Blum2011-09-28 23:03:30 -0700
commit74ec2b60cc48dacca26f7dbf4f9ca9110ac9b53a (patch)
treecaf1a259e5be9c702d40d9ad75294c162ca4aa55 /gruel/src/swig/pmt_swig.i
parent9e73c4e8372bc581d686d5e82a808894d41523ec (diff)
parent21e9139fb2ec13ec38287b36d6399c12b00b37c6 (diff)
downloadgnuradio-74ec2b60cc48dacca26f7dbf4f9ca9110ac9b53a.tar.gz
gnuradio-74ec2b60cc48dacca26f7dbf4f9ca9110ac9b53a.tar.bz2
gnuradio-74ec2b60cc48dacca26f7dbf4f9ca9110ac9b53a.zip
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'gruel/src/swig/pmt_swig.i')
-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>