%include "exception.i" %typemap(out) Amanith::GError { if ($1 != G_NO_ERROR) { SWIG_exception(SWIG_RuntimeError, ErrorUtils::ErrToString($1).c_str()); } $result = Py_None; }