Show how to handle a custom exception class in the example
Define "throws" typemap for it.
This commit is contained in:
parent
10d25c7327
commit
dfac9ce325
1 changed files with 4 additions and 0 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue