• 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: Buttons with Display Dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buttons with Display Dialog


  • Subject: Re: Buttons with Display Dialog
  • From: Wayne Melrose <email@hidden>
  • Date: Mon, 3 Dec 2007 15:33:46 +0100


On Dec 3, 2007, at 3:19 PM, Emmanuel wrote:

PS
One of our programmers installs a message display in the "top" handler, and in the other handlers he propagates the error after pre- pending the handler's name:



on error errtxt error "ThisHandlerName: " & errtxt end


I can second this as a great idea.. it's only cosmetic thing but one step further to that is ad a return in between the handler name and the error message, and maybe even a separating marker..

something like..

on error errtxt
	error "ThisHandlerName" & return & "-------------------" & errtxt
end

That way, as Emmanuel said, if the handler is actually called on from another handler, you will get a history of where the error occured.. something like this..


result -->

ThisHandlerName
-------------------
TheOtherHandlerName
-------------------
This is an error. _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
  • Follow-Ups:
    • Error Handler and Stack Trace (Was: Buttons with Display Dialog)
      • From: Skeeve <email@hidden>
    • Re: Buttons with Display Dialog
      • From: Wayne Melrose <email@hidden>
References: 
 >Buttons with Display Dialog (From: Kevin Ballon <email@hidden>)
 >Re: Buttons with Display Dialog (From: Peter Baxter <email@hidden>)
 >Re: Buttons with Display Dialog (From: Skeeve <email@hidden>)
 >Re: Buttons with Display Dialog (From: Emmanuel <email@hidden>)
 >Re: Buttons with Display Dialog (From: Skeeve <email@hidden>)
 >Re: Buttons with Display Dialog (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Buttons with Display Dialog
  • Next by Date: Re: Buttons with Display Dialog
  • Previous by thread: Re: Buttons with Display Dialog
  • Next by thread: Re: Buttons with Display Dialog
  • Index(es):
    • Date
    • Thread