How to use C++ exceptions with wxWidgets?
wxWidgets library itself is unfortunately not exception-safe (as its initial version predates, by far, the addition of the exceptions to the C++ language). However you can still use the exceptions in your own code and use the other libraries using the exceptions for the error reporting together with wxWidgets. There are a few issues to keep in mind, though: • You shouldn’t let the exceptions propagate through wxWidgets code, in particular you should always catch the exceptions thrown by the functions called from an event handler in the handler itself and not let them propagate upwards to wxWidgets. • You may need to ensure that the compiler support for the exceptions is enabled as, considering that wxWidgets itself doesn’t use the exceptions and turning their support on results in the library size augmentation of 10% to 20%, it is turned off by default for a few compilers. Moreover, for gcc (or at least its mingw version) you must also turn on the RTTI support to be able to use the exc