The Problem
I\'m writing a Cocoa application and I want to raise exceptions that will crash the application noisily.
I have the following li
I've posted this question and answer as I wish someone had told me this, oh, about a year ago:
Exceptions thrown on the main thread are caught by NSApplication.
I skim read the docs on NSException end to end, with no mention of this that I can recall. The only reason I know this is because of the fantastic Cocoa Dev:
http://www.cocoadev.com/index.pl?ExceptionHandling
The Solution. I guess.
I've got a daemon with no UI that almost entirely runs on the main thread. I'll have to transfer the whole app to run background threads, unless someone else can suggest a way of stopping NSApplication catching just the exceptions I throw. I'm pretty sure that's not possible.