• 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: What Does Error Return ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What Does Error Return ?


  • Subject: Re: What Does Error Return ?
  • From: Ted Wrigley <email@hidden>
  • Date: Fri, 13 Mar 2015 09:28:27 -0700

Easiest thing might be to re-throw the error with a location identifier added to the error text:

tester()

on tester()
try
set bb to 3 * "ccc"
on error errMsg number ErrNbr partial result partialResult from from_ to to_
error "Thrown @ tester(): " & errMsg
end try
end tester

Or you could with a new, identifying error number if you wanted to be more opaque.

On Mar 13, 2015, at 8:37 AM, email@hidden wrote:

From: Luther Fuller <email@hidden>
To: Applescript Users <email@hidden>
Date: March 13, 2015 at 8:28:13 AM PDT
Subject: Re: What Does Error Return ?


Thanks Yvan.
I tried your script and found that 'from' and 'to' seem to be explaining details of the error message text.

There is more to this question ...
My reason for looking at the information returned by 'error' was to determine if it
contained the name of the handler where the error occurred.

It does not and I have not found any way to obtain this information.

This would be extremely useful to know this when an error occurs.
When a user reports a bug to me, I get the error number and message text,
but I have to tediously inquire about what was being done when the error
occurred so that I can identify where it occurred.

Is there any way to obtain the name of the handler where an error occurs ?
(I don't think so, but perhaps someone knows more.)

 _______________________________________________
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

  • Prev by Date: Re: What Does Error Return ?
  • Next by Date: Re: What Does Error Return ?
  • Previous by thread: Re: What Does Error Return ?
  • Next by thread: integrating AppleScript and ScriptUI in Adobe Illustrator/InDesign?
  • Index(es):
    • Date
    • Thread