Is it ok to remove exception handling from JUCEApplicationBase::main() et al


#1

Hi All,

I'm currently trying to track down some occasional bugs in an already shipped Win32 application. 

I'm using a custom crash reporter which implements SetUnhandledExceptionFilter(TopLevelFilter ) to allow me to generate mini dump (.dmp) files. It's based on http://www.codeproject.com/Articles/1934/Post-Mortem-Debugging-Your-Application-with-Minidump and works great to get remote stack traces on client machines.

 

The problem I'm having is that both :

JUCEApplicationBase::main() 

MessageManager::runDispatchLoopUntil

Wrap their internal calls in JUCE_TRY / JUCE_CATCH_EXCEPTION blocks which stop my crash reporter getting the exceptions.

My question is how safe is it to comment out this exception handling so my crash reporter fires.

Obviously I mean purely from a JUCE point of view  -  exceptions caused by my code is my problem!

Any thoughts / experience greatly appreciated.

Thanks


#2

Yep, you can just build with JUCE_CATCH_UNHANDLED_EXCEPTIONS=0 and it won't do that try-catch stuff. It's mainly just there to help log exceptions, but obviously if you have some other system to do that then you don't need it.


#3

Better still! nicely done