• 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: Luther Fuller <email@hidden>
  • Date: Fri, 13 Mar 2015 13:01:56 -0500

On Mar 13, 2015, at 12:32 PM, Stockly, Ed wrote:

No.  AppleScript will NOT report a backtrace for an error.

You have to roll-your-own.

I use something like this:

try
MyFirstHandler()
on error errMsg number ErrNbr partial result partialResult from from_ to to_

... I would append the handler name to the error message here

end try

Yes, I see what you are doing here, but think of the cost.
EVERY call to a handler would have to be called from within a try block
that appends the handler name to the error message. This would make
the script almost unreadable.

This might work to debug a problem during development, but beyond that
I think it would be unworkable. I need to know the source of un-programmed
errors in a finished product.

This seems not to be possible, but if Apple is looking for ways to improve
AppleScript, returning the name of the source handler of an error
would be worth its weight in gold.



 _______________________________________________
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:
    • Re: What Does Error Return ?
      • From: "Stockly, Ed" <email@hidden>
References: 
 >What Does Error Return ? (From: Luther Fuller <email@hidden>)
 >Re: What Does Error Return ? (From: Luther Fuller <email@hidden>)
 >Re: What Does Error Return ? (From: Christopher Stone <email@hidden>)
 >Re: What Does Error Return ? (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: What Does Error Return ?
  • Next by Date: Re: Can't Coerce String to Date?
  • Previous by thread: Re: What Does Error Return ?
  • Next by thread: Re: What Does Error Return ?
  • Index(es):
    • Date
    • Thread