Re: Current line in Script Debugger
Re: Current line in Script Debugger
- Subject: Re: Current line in Script Debugger
- From: Graff <email@hidden>
- Date: Sat, 30 Oct 2004 02:13:48 -0400
Well I have a solution but you probably won't like it. As far as I know
it's the only way to do it.
Every other line increment a counter variable by 2. Put everything in
a try block and when an error occurs put up a dialog with the value of
the counter.
Yeah, it's a hell of a kludge but I don't think there is any other way.
Here's an example:
----
set lineNum to 1
try
set lineNum to 3
-- do other things here
set lineNum to 5
on error
set lineNum to 5
display dialog "An error occured at line number" & lineNum
end try
----
- Ken
On Oct 29, 2004, at 4:02 AM, Kumar Shailove wrote:
Hello list,
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.
Thanks in advance.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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