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 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.
|