title: g++ problem: exception not caught
body: <p>The situation is that I have a dynamic library written in C++ that is wrapped for Python by another dynamic library, also written in C++ (generated by SIP to be specific). The first dynamic library defines a function <code>do_raise</code>, which throws an exception <code>RaiserError</code>, a subclass of <code>std::exception</code>. The second dynamic library, in wrapping <code>do_raise</code>, tries to catch <code>RaiserError</code> in order to translate it to a Python exception.</p>
  
  <p>Building with Visual C++, everything works as expected and <code>RaiserError</code> is caught correctly. Using g++ on Linux however, <code>RaiserError</code> is not caught. If I try to catch <code>std::exception</code> instead (<code>RaiserError</code>'s baseclass), it works. What goes wrong here? Do the two libraries have different notions of the <code>RaiserError</code> type, since it does not get recognized by the catch block?</p>
  
  <p>For testing I also write a small executable which calls <code>do_raise</code> in the C++ library, and here I am able to catch <code>RaiserError</code> even with g++.</p>