swig/Examples/c/exception
Vadim Zeitlin 9a8ebbb998 Throw SWIG_CException from C++ wrappers automatically
Check for the pending exception after every call to a wrapper function
not marked "noexcept" and throw a C++ exception if necessary.

Add C++ version of the exception example to show how this works.

Also change SWIG_CException to use member functions for checking for and
resetting pending exceptions, this seems better than having separate
functions for it and will make it easier to customize exception handling
later by just replacing SWIG_CException class with something else.

Note that we still use a global (and not a member) function for raising
the exception, but this one is not exported at all, and needs to be a
function in order to be easily callable from other modules (see the
upcoming commit).
2021-11-27 00:19:05 +01:00
..
example.cxx Removing some memory leak problems when handling exceptions. 2008-07-26 14:18:37 +00:00
example.h Don't use exception specification with C++ compiler in example 2021-11-24 20:16:42 +01:00
example.i Don't use exception specification with C++ compiler in example 2021-11-24 20:16:42 +01:00
Makefile Throw SWIG_CException from C++ wrappers automatically 2021-11-27 00:19:05 +01:00
runme.c Throw SWIG_CException from C++ wrappers automatically 2021-11-27 00:19:05 +01:00
runme.cxx Throw SWIG_CException from C++ wrappers automatically 2021-11-27 00:19:05 +01:00