Re: What Does Error Return ?
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.
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 itcontained 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 erroroccurred 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