the script of <object> with line numbers?
Pi Digital
sean at pidigital.co.uk
Mon Aug 29 23:49:21 EDT 2022
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.
More information about the use-livecode
mailing list