From 46263199b864de68dac8ad65fe207d49ab70460f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 25 Nov 2012 14:12:44 -0800 Subject: make use of PMC/Registry.i in SBuffer binding --- include/gras/element.i | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') 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 @@ -12,6 +12,18 @@ //////////////////////////////////////////////////////////////////////// #pragma SWIG nowarn=401 +//////////////////////////////////////////////////////////////////////// +// http://www.swig.org/Doc2.0/Library.html#Library_stl_exceptions +//////////////////////////////////////////////////////////////////////// +%include + +%exception +{ + try{$action} + catch (const std::exception& e) + {SWIG_exception(SWIG_RuntimeError, e.what());} +} + //////////////////////////////////////////////////////////////////////// // Export swig element comprehension //////////////////////////////////////////////////////////////////////// -- cgit