WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Exact Line Number of Error Reported


Question:

Is there any way to get Winbatch to give you the exact relative line number in a script when a fatal error occurs? What I get in the error log (using IntControl 38) is:
11/04/03 17:07:19 WBT - dolanservicenew.exs
3357: End Error: No match found
endif
There are many endif's in the script and since this error doesn't occur all the time it's hard to track when it does.

Answer:

Since know the error occurs on an ENDIF, change the code to:
ENDIF ; 6
which "numbers" the endifs in the code in the interpreter. This will display on the error screen.

Also, proper formatting/indenting can also be useful. Every time you do an "If/EndIf" indent the code between the "If" and the "Else" or "EndIf".Doing this you should find something that doesn't line up right. This applies to For/Next and While/EndWhile also. If you have nested loops, just keep indenting accordingly.

A good debug trace should help out.


Article ID:   W16020
File Created: 2004:03:30:15:42:18
Last Updated: 2004:03:30:15:42:18