diff options
author | Josh Blum | 2011-10-08 11:56:02 -0700 |
---|---|---|
committer | Josh Blum | 2011-10-08 11:56:02 -0700 |
commit | 7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3 (patch) | |
tree | c0f3b142d6c288a7d214d82bb885c8797d3d2587 /gruel/src | |
parent | b06328b4adee941fe62f12a848cc903097711bdd (diff) | |
parent | f29a49a40a3f706ae14d7d69c536d87eff3b53db (diff) | |
download | gnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.tar.gz gnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.tar.bz2 gnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.zip |
Merge branch 'next' into digital
Diffstat (limited to 'gruel/src')
-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> |