When using hotkeys or other functionality that enables #Persistent, unhandled Exceptions cause the current thread to exit rather than ExitApp. It is incredibly rare that I would be able to recover the program after an unhandled Exception, so instead of exiting the thread I would like to ExitApp. Otherwise the user has a zombie programming running that really should have closed when it failed.
Is it possible to ExitApp on an unhandled Exception? I created this fork of AHK_L to get the required functionality, but it might be a little over the top (and buggy).
I'm not a fan of wrapping my entire programs in try/catch/finally statements either. But if that's how it's meant to be done I can look into it.
How to ExitApp on Exception?
Re: How to ExitApp on Exception?
Maybe I should simply wrap my program in a try/catch/finally statement since I also do logging
https://stackoverflow.com/questions/273 ... -try-catch
edit: on further thought this might not catch other threads from hotkeys. I've looked at Only catch errors causing the script to exit but I need to think about whether this would work for me.
https://stackoverflow.com/questions/273 ... -try-catch
edit: on further thought this might not catch other threads from hotkeys. I've looked at Only catch errors causing the script to exit but I need to think about whether this would work for me.