Re: More Mac like handling of OS raised exceptions
Re: More Mac like handling of OS raised exceptions
- Subject: Re: More Mac like handling of OS raised exceptions
- From: Ondra Cada <email@hidden>
- Date: Tue, 16 May 2006 13:32:52 +0200
Greg,
On 16.5.2006, at 12:59, Greg Hurrell wrote:
I don't trap signals because if there's a bug in my code then I
actually *want* it to crash...
Well... the idea isn't bad, but the user whose unsaved data went poof
as a result of the crash would hardly be thoroughly impressed.
The reasonable way is
(i) to catch any catchable exception (signal, whatever);
(ii) in the handler, to save changes(*) far as technically possible,
of course *not* overwriting the previous save, for the bug may have
caused data inconsistence. Still it's much better to have, say, a
document with one paragraph mangled, than no document at all;
(iii) only after that, to "crash" (i.e., terminate reporting a
problem), preferrably incl. sending the crash report home
automatically (with the user confirmation of course, but without
having him to send an e-mail explicitly: a number of them won't care).
(*) including "transient" information which would be zapped by crash,
too--like a list of currently open URLs in a web browser. Depending
on which kind of users the application is aimed at, you also should
consider allowing at (iii) the user to continue at his own risk.
I haste to add that I completely agree with the rest of your message
which I haven't quoted :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden