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

**URL:** <https://forum.juce.com/t/is-it-ok-to-remove-exception-handling-from-juceapplicationbase-main-et-al/16437>\
**Category:** General JUCE discussion\
**Created:** [January 19, 2016, 8:33pm UTC](https://forum.juce.com/t/is-it-ok-to-remove-exception-handling-from-juceapplicationbase-main-et-al/16437 "2016-01-19T20:33:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamvietnam](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@adamvietnam](https://forum.juce.com/u/adamvietnam)\
**Post date:** [January 19, 2016, 8:33pm UTC](https://forum.juce.com/t/is-it-ok-to-remove-exception-handling-from-juceapplicationbase-main-et-al/16437/1 "2016-01-19T20:33:26Z")

</div>

Hi All,

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

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

&nbsp;

The problem I'm having is&nbsp;that both :

```
JUCEApplicationBase::main() 

MessageManager::runDispatchLoopUntil
```

Wrap their internal calls in&nbsp;JUCE\_TRY /&nbsp;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&nbsp;purely from a JUCE point of view &nbsp;- &nbsp;exceptions caused by my code is my problem!

Any thoughts / experience greatly appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 20, 2016, 5:42am UTC](https://forum.juce.com/t/is-it-ok-to-remove-exception-handling-from-juceapplicationbase-main-et-al/16437/2 "2016-01-20T05:42:20Z")

</div>

Yep, you can just build with&nbsp;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.

---

<div class="post-metadata">

**Author:** ![adamvietnam](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@adamvietnam](https://forum.juce.com/u/adamvietnam)\
**Post date:** [January 20, 2016, 2:30pm UTC](https://forum.juce.com/t/is-it-ok-to-remove-exception-handling-from-juceapplicationbase-main-et-al/16437/3 "2016-01-20T14:30:20Z")

</div>

Better still! nicely done
