Show how to handle a custom exception class in the example

Define "throws" typemap for it.
This commit is contained in:
Vadim Zeitlin 2016-04-22 23:40:35 +02:00
commit dfac9ce325

View file

@ -5,6 +5,10 @@
#include "example.h"
%}
%typemap(throws, noblock="1") Exc {
SWIG_exception(SWIG_RuntimeError, $1.msg);
}
/* Let's just grab the original header file here */
%include "example.h"