Re: Strong language about Cocoa and Qt.
Re: Strong language about Cocoa and Qt.
- Subject: Re: Strong language about Cocoa and Qt.
- From: Marco Scheurer <email@hidden>
- Date: Tue, 1 Jul 2003 23:57:32 +0200
On Tuesday, July 1, 2003, at 07:37 PM, Rich Warren wrote:
A "does not respond to selector" exception is raised. Now it can be
catched or not, but at least while debugging you should always break
on
all exceptions.
Oh, cool. I did not know that. That's really useful.
Again, it's a case of Objective C acting differently than other
programs I'm
used to. In Java and C++ an uncaught exception kills the program. I
kind of
wish it was the other way around--that Objective C also stopped on
exceptions.
An uncaught exception in Objective-C kills the program too. Catching
exceptions as to not to crash the program has nothing to do with the
language, but how it is used (you could do the same thing in C++). And
crashing or not a deployed application is an engineering tradeoff.
There could be good reasons not to crash after all. The current
operation has probably failed, but the app might still be usable in
it's next passage in the run loop. I agree that a quietly writing
something in the error log is not very user-friendly, but then crashing
is even less user friendly, if more informative that something went
wrong. But again, these kind of errors (does not respond to selector)
should be rare and found during development and testing.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.