#138366 - 2005-04-21 06:51 PM
Re: retrieve executed script line number
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Quote:
I came about this when I used the copy command and recieved no output (while it also didn't do what I wanted...),
Hi Yogi, since as you say you're not too much a noob that's cool so I'll just say that KiXtart along with most other scripting languages has limits on what can be handled. As I'm sure you know like Les says, if KiX coughs on the code you get nothing (unless you're interactively running it from a DOS console) Beyond that most scripters seem to just write the code and run it and hope for the best, once it doesn't seem to work as they want then they either run their script with the /D (debug) command and walk through it, or place DEBUG code into the script and watch the output to find where the script has gone askew.
Typically stuff like ? 'Got to line# n ' + @ERROR + ' ' + @SERROR or similar output to help locate the problem.
Then once the code is functioning as you would like and if you're logging stuff you would place in certain @ERROR checks so that they could be logged using some type of other data that would help you to know what and where the script went askew. Sorry but without a ton of bloat currently don't think there is a method to give actual line number into the log (nice suggestion though that goes along with the request for ONERROR RESUME, which has also not been implemented yet). But remember that if the error is severe enough to crash the KiX executable then you will have no log of any type either.
Good luck and post the completed script to the SCRIPTS forum where we can comment on the code or help to improve it if needed or possible.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1003 anonymous users online.
|
|
|