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 "Introduction to Exception Programming Topics for Cocoa" > > “Important: You should reserve the use of exceptions for programming or > unexpected runtime errors such as out-of-bounds collection access, attempts > to mutate immutable objects, sending an invalid message, and losing the > connection to the window server. You usually take care of these sorts of > errors with exceptions when an application is being created rather than at > runtime.
Yes, but fatal errors are usually the type that can bring down the entire program, such as running out of memory or dividing by zero. An out-of-bounds exception often doesn't have to kill the program. Of course, if the developer wants it to kill the program, then they can override -[NSApplication run] to catch the exception and quit. Nick Zitzmann <http://www.chronosnet.com/> _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com