2 the oddities described below are NOT present when using
3 wxPythonGTK-py2.2-2.4.0.2-2 but are present when wxPythonGTK-py2.2-2.3.4.2-1.
4 -------------------------------------------------------------------------
5 The purpous of this set of files is to illustrate an unexpected behavior
6 of exception handling of swig wrapped c++ libraries with wxPython.
8 - g++ version 2.96 or 3.2
12 Consider the code in one of the foo_main.cxx say foo_main.cxx.minimal:
15 void MyWrappedFunction(void) {
16 try { throw "In thrower"; }
17 catch (const char * str) { cout<<"Exception"<< str << endl; }
24 When compiling this code and executing it one obtains the correct behavior
25 of the exception i.e. ExceptionIn thrower.
26 Now, wrap the above code with swig and invoque the following python
30 foo.MyWrappedFunction()
31 Surprisingly enough the exception won't be caugth, but terminate will
32 catch it and invoke abort.
33 Note that the exception is properly caught when one doesn't import
35 Note that the exception is properly caught when one doesn't import
38 In order to play with this example, try the following:
39 ln -s foo_main.cxx.minimal foo_main.cxx
40 ln -s foo.cxx.minimal foo.cxx