Re: Finalizing Script
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.