Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to use C++ exceptions with wxWidgets?

exceptions wxwidgets
0
Posted

How to use C++ exceptions with wxWidgets?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123