Entry
Is there a way of knowing exactly at what line an error occurred?
Jul 4th, 2001 02:05
Magnus Gudmundsson,
Yes, in vb1->6 there is.
There is an undocumented function called erl
so say you have this code:
public function DummyFunctionThatDemonstratesErl
dim lSum as long
on error goto Hell
1 'loads of code
2 '
3 '
4 '
5 '
6 lsum = 100/0
7 ' even more code
Exit function
Hell
msgbox "Error occured at line: " & erl
End function
'***********'
Notice that u have to markup each line with a number in order for Erl
to work.
This can be particulary useful if U have an error that occurs at
runtime on certain clients, then U can just make a debug version with
marked lines, and get information about exactly where the error occurs.