1 %include <typemaps/exception.swg> 2 3 %insert("runtime") { 4 %define_as(SWIG_exception(code, msg), %block(%error(code, msg); SWIG_fail; )) 5 } 6