Commit graph

3 commits

Author SHA1 Message Date
Vadim Zeitlin
d2546e23ff Don't use exception specification with C++ compiler in example
Support for the exception specifications using types was removed in
C++17 (and "throw ()" in C++20), so don't use them when using the C++
compiler any longer, as this broke the example with recent g++ versions
that use C++17 by default.

We still need them for SWIG, however, so use SWIG_THROW macro, defined
differently for SWIG and the compiler, to preserve the existing
behaviour.

Using %except might be a better idea, but would require more changes.
2021-11-24 20:16:42 +01:00
Vadim Zeitlin
dfac9ce325 Show how to handle a custom exception class in the example
Define "throws" typemap for it.
2016-09-15 01:27:40 +02:00
Maciej Drwal
7e23a5a55e Removing some memory leak problems when handling exceptions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10713 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-26 14:18:37 +00:00