• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: More Mac like handling of OS raised exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: More Mac like handling of OS raised exceptions
      • From: Greg Hurrell <email@hidden>
References: 
 >Fwd: More Mac like handling of OS raised exceptions (From: Lon Giese <email@hidden>)
 >Re: More Mac like handling of OS raised exceptions (From: Greg Hurrell <email@hidden>)

  • Prev by Date: Re: [ANN] CodeSynthesis XSD - XML data binding compiler for C++
  • Next by Date: Re: [ANN] CodeSynthesis XSD - XML data binding compiler for C++
  • Previous by thread: Re: More Mac like handling of OS raised exceptions
  • Next by thread: Re: More Mac like handling of OS raised exceptions
  • Index(es):
    • Date
    • Thread