• 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: how to get the name of the current handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get the name of the current handler


  • Subject: Re: how to get the name of the current handler
  • From: email@hidden
  • Date: Mon, 7 Nov 2005 15:00:53 -0500

For producing end-user error messages, you'll need to provide your own reporting code (e.g. wrapping the body of each handler in a try block that extends the error message string with its own information, then rethrows the error)

That is what I am being forced to do.

>"macro-style script that inserts these automatically"

I was not aware AS has Macro capabilities. how do you do it?



On Nov 7, 2005, at 2:09 PM, has wrote:

email@hidden wrote:

I am trying to avoid hard coding, so that it can be a generic error trap function. It seems like Applescript does not have this. Maybe in 2.0 handler properties can be added, such as it's name and even the handle itself.

What you're talking about is introspection, which AppleScript doesn't have. (It wouldn't be a terribly appropriate feature for the type of audience AS is primarily targeted at anyway.) What you really want is automatic tracebacks, but AS doesn't provide those either. (This is a genuinely annoying omission, but that's AS for you.)


For debugging scripts during development, you might consider investing in a copy of Script Debugger <http://www.latenightsw.com/>; I'm sure other folks here can brief you on the capabilities of its AS debugger component.

For producing end-user error messages, you'll need to provide your own reporting code (e.g. wrapping the body of each handler in a try block that extends the error message string with its own information, then rethrows the error). You could always write a macro-style script that inserts these automatically.

HTH

has
-- http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: how to get the name of the current handler (From: has <email@hidden>)

  • Prev by Date: Alias listfrom find shell
  • Next by Date: Re: how to get the name of the current handler
  • Previous by thread: Re: how to get the name of the current handler
  • Next by thread: Re: how to get the name of the current handler
  • Index(es):
    • Date
    • Thread