Re: Applescript-users Digest, Vol 1, Issue 158
Re: Applescript-users Digest, Vol 1, Issue 158
- Subject: Re: Applescript-users Digest, Vol 1, Issue 158
- From: Mark Alldritt <email@hidden>
- Date: Sat, 30 Oct 2004 09:23:13 -0700
> I need to write a script in which I want to retrieve the current line number
> of the script, if the script is being executed from script debugger, so that
> if an error occurs, a dialog can be displayed or a report can be generated,
> which says which line number caused the error, so that a person can directly
> go to that line and may inspect the cause of the error without going through
> the Apple Event Log.
There are a series of properties on the 'script document' object that report
information about script errors:
last error number integer [r/o] -- last compilation or execution error
code.
last error message string [r/o] -- last compilation or execution error
message.
last error range reference [r/o] -- position of last compilation or
execution error.
last error partial result anything [r/o] -- the partial result of the
last error.
last error offending object anything [r/o] -- the offending object of
the last error.
last error application anything [r/o] -- the application reporting the
last error.
last error expected type type class [r/o] -- the expected type of the
last error.
The 'last error range' property points to the text that AppleScript reports
as the source of the error.
Cheers
-Mark
---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB: http://www.latenightsw.com/ CANADA V8V-4M9
_______________________________________________
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