Skip to content
Snippets Groups Projects
Commit 5c82d73e authored by Utz-Uwe Haus's avatar Utz-Uwe Haus
Browse files

Implement mstro_status -> Exception typemap

parent b8186c14
No related branches found
No related tags found
1 merge request!24Draft: Resolve "scripting interface to maestro core"
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
%include "typemaps.i" %include "typemaps.i"
%include "stdint.i" %include "stdint.i"
%include "cpointer.i" %include "cpointer.i"
%include "exception.i"
/* handling mstro_status return codes: suppress unless an error needs to be indicated. In that case: throw exeption */
%typemap(out) mstro_status {
if(MSTRO_OK!=$1) {
SWIG_exception(SWIG_RuntimeError, mstro_status_description($1));
} else {
$result = SWIG_Py_Void();
}
}
%{ %{
#define SWIG_FILE_WITH_INIT #define SWIG_FILE_WITH_INIT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment