David, Simply because an exception is thrown and not caught does not necessarily mean that the application is in an unknown state.
Indeed some applications may have come to rely on this behavior and it makes it very difficult to port applications which do this without refactoring. As far as being "dangerously wrong" I believe it's equally wrong (or, perhaps, worse) to have the application blow up when an exception is easily recoverable and isn't fatal. The philosophy is that, if it is possible to continue... it should continue. It is up to the app developer to catch the exception and take appropriate action. If it's a fatal exception, it should be up to the developer of the application to cause the app to terminate. We should NOT force the decision. Later, GC Gregory Casamento -- Principal Consultant - OLC, Inc # GNUstep Chief Maintainer ________________________________ From: David Ayers <ay...@fsfe.org> To: Gregory Casamento <greg.casame...@gmail.com> Cc: Adam Fedor <fe...@qwestoffice.net>; Developer GNUstep <gnustep-dev@gnu.org> Sent: Thursday, February 5, 2009 12:50:15 AM Subject: Re: Allowing Applications to continue after exception... Am Mittwoch, den 04.02.2009, 23:52 -0500 schrieb Gregory Casamento: > The attached test program does not crash on Mac OS X when the button > is pressed, but does crash on GNUstep. The button calls the "action:" > method in Controller which immediately throws an exception. > > I believe this confirms that GNUstep's behavior is inconsistent with > Cocoa. I can test on OpenStep, but I suspect that the behavior is > the same there as it is on Cocoa. FWIW, IIRC this inconsistency was intentional an I believe for a very good reason. I thought we had documented it at the time but I can't dig it up easily right now. An uncaught exception indicates that the application is in an undefined state. For certain type of applications (like viewers) this can be ignored. For editor application this could mean that the document being edited could be corrupted and saving it cause data corruption. This thread is the only reference I found in which we suggested some type of "Developer-Mode" which indicates that "I know what I'm doing, let me debug, will you?!". http://lists.gnu.org/archive/html/discuss-gnustep/2004-10/msg00092.html I still believe that handling generic handling of exceptions in the runloop is a dangerously wrong and an implementation detail that we shouldn't try to be compatible with. But others may disagree. Cheers, David _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev