diff options
author | Johnathan Corgan | 2011-09-27 10:32:29 -0700 |
---|---|---|
committer | Johnathan Corgan | 2011-09-27 10:32:29 -0700 |
commit | cb23b7a23ca8a1b1331e3d70e97425b1d52b2222 (patch) | |
tree | d4297d51d5b04906afa110934f2ac911adcf369d /gruel | |
parent | 77f5aa4f1985e0605b5ed07994a2af7dac2d2a8d (diff) | |
parent | 5b1c7b73d0cb2dbbf944c3be670a7f2d74547e0f (diff) | |
download | gnuradio-cb23b7a23ca8a1b1331e3d70e97425b1d52b2222.tar.gz gnuradio-cb23b7a23ca8a1b1331e3d70e97425b1d52b2222.tar.bz2 gnuradio-cb23b7a23ca8a1b1331e3d70e97425b1d52b2222.zip |
Merge branch 'maint'
Diffstat (limited to 'gruel')
-rw-r--r-- | gruel/src/swig/pmt_swig.i | 18 |
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> |