Re: App Will Not Terminate After Uncaught Excpetion

2010-12-17 Thread Andreas Grosam
Look up NSExceptionHandler. http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Exceptions/Tasks/ControllingAppResponse.html --Kyle Sluder The Exception-handling framework let you define the logging and handling behavior for all uncaught exceptions, system-level

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-17 Thread Andreas Grosam
On Dec 17, 2010, at 9:25 AM, Andreas Grosam wrote: And NSApp does not handle these exceptions in any way - it just consumes or ignores them. correction: the NSApp's top handler will log the exception reason, then continue___ Cocoa-dev mailing

App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Andreas Grosam
Hi All, An application (NSApplication) will not terminate if an exception is thrown:, eg: - (void) applicationDidFinishLaunching:(NSNotification*)notification { NSAssert(0, @failed); } or - (IBAction) buttonPressed:(id) sender { [self throwFatalError]; // throws NSException } The

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Nick Zitzmann
On Dec 16, 2010, at 6:38 AM, Andreas Grosam wrote: In Cocoa, exceptions are considered fatal errors, and code is usually not exception safe. [citation needed] That is, after catching an exception, it is very probable that the application state is corrupted and can not be restored. So, is

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Jean-Daniel Dupas
Le 16 déc. 2010 à 17:32, Nick Zitzmann a écrit : On Dec 16, 2010, at 6:38 AM, Andreas Grosam wrote: In Cocoa, exceptions are considered fatal errors, and code is usually not exception safe. [citation needed] From Introduction to Exception Programming Topics for Cocoa “Important:

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Nick Zitzmann
On Dec 16, 2010, at 9:40 AM, Jean-Daniel Dupas wrote: Le 16 déc. 2010 à 17:32, Nick Zitzmann a écrit : On Dec 16, 2010, at 6:38 AM, Andreas Grosam wrote: In Cocoa, exceptions are considered fatal errors, and code is usually not exception safe. [citation needed] From

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Andreas Grosam
On Dec 16, 2010, at 5:32 PM, Nick Zitzmann wrote: See https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniAppKit/OAApplication.m for one such example. Thank you very much, this is exactly what I'm looking for! :) On Dec 16, 2010, at 5:55 PM, Nick Zitzmann wrote: On Dec 16,

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread jonat...@mugginsoft.com
On 16 Dec 2010, at 19:24, Andreas Grosam wrote: On Dec 16, 2010, at 5:32 PM, Nick Zitzmann wrote: See https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniAppKit/OAApplication.m for one such example. Thank you very much, this is exactly what I'm looking for! :) This is

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Kyle Sluder
On Thu, Dec 16, 2010 at 12:41 PM, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: This is something that has had me scratching my upper organ casing too. The NSApplication docs state that NSApplicationMain is functionally similar to: void NSApplicationMain(int argc, char *argv[]) {  

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Dave Keck
Look up NSExceptionHandler. NSExceptionHandler (and NSSetUncaughtExceptionHandler for that matter) can't help because the exception is being caught by AppKit. Furthermore, the NSApplication subclass technique mentioned earlier won't work in all cases either, since some AppKit/Foundation wrap

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Dave Keck
Presumably it is more functionally similar to: On my system, the exception is being caught from within -[NSApplication run]. So it would look like the implementation of -run shown here: http://cocoawithlove.com/2009/01/demystifying-nsapplication-by.html with a @try around the calls to

Re: App Will Not Terminate After Uncaught Excpetion

2010-12-16 Thread Jean-Daniel Dupas
Le 17 déc. 2010 à 00:06, Dave Keck a écrit : Presumably it is more functionally similar to: On my system, the exception is being caught from within -[NSApplication run]. So it would look like the implementation of -run shown here: