summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorJosh Blum2011-10-08 11:56:02 -0700
committerJosh Blum2011-10-08 11:56:02 -0700
commit7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3 (patch)
treec0f3b142d6c288a7d214d82bb885c8797d3d2587 /gnuradio-core
parentb06328b4adee941fe62f12a848cc903097711bdd (diff)
parentf29a49a40a3f706ae14d7d69c536d87eff3b53db (diff)
downloadgnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.tar.gz
gnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.tar.bz2
gnuradio-7a2d39f425f6bc5df6a4f7206d3fa10f8e1e67c3.zip
Merge branch 'next' into digital
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/swig/CMakeLists.txt32
-rw-r--r--gnuradio-core/src/lib/swig/gnuradio.i18
2 files changed, 21 insertions, 29 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt
index 0d10245bf..9c7a75b4f 100644
--- a/gnuradio-core/src/lib/swig/CMakeLists.txt
+++ b/gnuradio-core/src/lib/swig/CMakeLists.txt
@@ -42,41 +42,15 @@ SET(GR_SWIG_LIBRARIES gnuradio-core)
# smaller pieces for the compiler to digest. prior to this change, on
# X86_64, g++'s resident set size was 650MB!
# ----------------------------------------------------------------
-FILE(GLOB GR_SWIG_SOURCE_DEPS
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/runtime/*.i"
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/runtime/*.h"
-)
-GR_SWIG_MAKE(gnuradio_core_runtime gnuradio_core_runtime.i)
-UNSET(GR_SWIG_SOURCE_DEPS)
-FILE(GLOB GR_SWIG_SOURCE_DEPS
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/general/*.i"
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/general/*.h"
-)
-GR_SWIG_MAKE(gnuradio_core_general gnuradio_core_general.i)
-UNSET(GR_SWIG_SOURCE_DEPS)
+SET(GR_SWIG_TARGET_DEPS gengen_generated filter_generated)
-SET(GR_SWIG_TARGET_DEPS gengen_generated)
+GR_SWIG_MAKE(gnuradio_core_runtime gnuradio_core_runtime.i)
+GR_SWIG_MAKE(gnuradio_core_general gnuradio_core_general.i)
GR_SWIG_MAKE(gnuradio_core_gengen gnuradio_core_gengen.i)
-UNSET(GR_SWIG_TARGET_DEPS)
-
-SET(GR_SWIG_TARGET_DEPS filter_generated)
GR_SWIG_MAKE(gnuradio_core_filter gnuradio_core_filter.i)
-UNSET(GR_SWIG_TARGET_DEPS)
-
-FILE(GLOB GR_SWIG_SOURCE_DEPS
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/io/*.i"
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/io/*.h"
-)
GR_SWIG_MAKE(gnuradio_core_io gnuradio_core_io.i)
-UNSET(GR_SWIG_SOURCE_DEPS)
-
-FILE(GLOB GR_SWIG_SOURCE_DEPS
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/hier/*.i"
- "${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/hier/*.h"
-)
GR_SWIG_MAKE(gnuradio_core_hier gnuradio_core_hier.i)
-UNSET(GR_SWIG_SOURCE_DEPS)
GR_SWIG_INSTALL(TARGETS
gnuradio_core_runtime
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i
index 1856d5007..e365aeac7 100644
--- a/gnuradio-core/src/lib/swig/gnuradio.i
+++ b/gnuradio-core/src/lib/swig/gnuradio.i
@@ -26,6 +26,24 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
+// 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");
+ }
+
+}
+
+////////////////////////////////////////////////////////////////////////
// Headers
%{