Re: the script of with line numbers?

Mon, 29 Aug 2022 20:51:10 -0700

Using The earlier example, you could use

put theErrorLineNum into tLineNum
put the script of stack “myScript” into tScript
split tScript using cr
logError tLineNum, tScript[tLineNum]

Or something like that. 

Sean


>>> Is there a way (an existing function or command in the language or IDE) to 
>>> get the script of an object WITH the line numbers as you see them in the 
>>> IDE script editor?
>> 
>> While some clever solutions have been posted, I gotta ask WHY?
>> 
> 
> In our applications, we trap the script error dialog and replace the default 
> with our own. That dialog lets customers send the executionContexts and some 
> other debugging information to us to report an error (if one gets by 
> quality/beta testing).
> 
> So we get the executionContext that say "error such and such occurred at line 
> 342 of some handler". The line number is the line of the whole script the 
> handler is in.
> 
> When we et the message and log the problem in our instance of Bugzilla, one 
> of the 1st things is to look at the script and see what the line of code 
> references actually says.
> 
> It could reduce a trouble should step to include the line numbers 
> programmatically in the error report.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to