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). |
||
|---|---|---|
| .. | ||
| class | ||
| exception | ||
| simple | ||
| std_vector | ||
| check.list | ||