You can do this using gdb or another debugger. Tell the debugger to stop when any exception is throw (in gdb the command is hilariously catch throw
). Then you will see not only the type of the exception, but where exactly it is coming from.
Another idea is to comment out the catch (...)
and let your runtime terminate your application and hopefully tell you more about the exception.
Once you figure out what the exception is, you should try to replace or augment it with something that does derive from std::exception
. Having to catch (...)
at all is not great.
If you use GCC or Clang you can also try __cxa_current_exception_type()->name()
to get the name of the current exception type.