diff options
author | Josh Blum | 2012-11-25 14:12:44 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-25 14:12:44 -0800 |
commit | 46263199b864de68dac8ad65fe207d49ab70460f (patch) | |
tree | 138133ab847e822901f98dff4ffc2bdc4be02a97 /include | |
parent | 7cfebe2bd52a2cfc1e8b778968cec7ba43457879 (diff) | |
download | sandhi-46263199b864de68dac8ad65fe207d49ab70460f.tar.gz sandhi-46263199b864de68dac8ad65fe207d49ab70460f.tar.bz2 sandhi-46263199b864de68dac8ad65fe207d49ab70460f.zip |
make use of PMC/Registry.i in SBuffer binding
Diffstat (limited to 'include')
-rw-r--r-- | include/gras/element.i | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gras/element.i b/include/gras/element.i index 8dc360b..f826ca8 100644 --- a/include/gras/element.i +++ b/include/gras/element.i @@ -13,6 +13,18 @@ #pragma SWIG nowarn=401 //////////////////////////////////////////////////////////////////////// +// http://www.swig.org/Doc2.0/Library.html#Library_stl_exceptions +//////////////////////////////////////////////////////////////////////// +%include <exception.i> + +%exception +{ + try{$action} + catch (const std::exception& e) + {SWIG_exception(SWIG_RuntimeError, e.what());} +} + +//////////////////////////////////////////////////////////////////////// // Export swig element comprehension //////////////////////////////////////////////////////////////////////// %include <std_string.i> |