MGC22
asked on
Tracking any line of code that throws an error.
Is there a way in VB6 to know exactly what line of code errored when the error handling is called?
Does VB track the line it is executing in a variable or something while it is processing. Something like a variable called strCodeExecuting that whenever on error is encountered I can write the variable out and know exactrly the line of code that was trying to be executed?
I want to keep a log of all errors, clients do not always tell me what the actual error was, or all the errors for that matter.
Thanks,
Mike
Does VB track the line it is executing in a variable or something while it is processing. Something like a variable called strCodeExecuting that whenever on error is encountered I can write the variable out and know exactrly the line of code that was trying to be executed?
I want to keep a log of all errors, clients do not always tell me what the actual error was, or all the errors for that matter.
Thanks,
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The source code for a vb add-in to add line numbers to code is here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=49876&lngWId=1
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=49876&lngWId=1
Thanks :)
ASKER
As JR2003 mentions about the line numbers, is there a way to automate putting in the line numbers in VB6?