• 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: Finalizing Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finalizing Script


  • Subject: Re: Finalizing Script
  • From: Greg Back <email@hidden>
  • Date: Fri, 30 Aug 2002 16:38:25 -0400

On Thursday, August 29, 2002, at 11:23 AM, has wrote:

- In error reporting, don't use a dialog box to report errors. This is much
too specific: actually _deciding_ what to do when things go wrong should be
the _caller's job_, not yours. Your task is merely to inform them what as
gone wrong. Have your module throw its own custom error. Each error you
throw should have: 1. a message explaining the problem, and 2. a suitable
error number [unique, if necessary] so that the caller can trap and handle
specific errors if they wish.

A couple questions questions: Is it good/bad/really bad to use a positive error number to distinguish it as a custom error?

Does anyone have any sample code of how this would actually be implemented?

And how would you go about documenting these custom errors?


Thanks.
--
Greg Back
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Finalizing Script
      • From: Philip Aker <email@hidden>
References: 
 >Re: Finalizing Script (From: has <email@hidden>)

  • Prev by Date: Re: What's system attribute "__CF_USER_TEXT_ENCODING"?
  • Next by Date: Re: Opening System Preference Panes
  • Previous by thread: Re: Finalizing Script
  • Next by thread: Re: Finalizing Script
  • Index(es):
    • Date
    • Thread