swig/Examples/c
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
..
class Show using C++ wrapper API for the "class" example 2021-11-19 02:04:41 +01:00
exception Throw SWIG_CException from C++ wrappers automatically 2021-11-27 00:19:05 +01:00
simple Allow having C++ test cases for C backend 2021-11-19 00:08:43 +01:00
std_vector Allow having C++ test cases for C backend 2021-11-19 00:08:43 +01:00
check.list Many major improvements. Almost all testsuite compiles now. 2009-04-15 23:30:16 +00:00