Link to home
Start Free TrialLog in
Avatar of judgeking
judgekingFlag for Canada

asked on

Programmatically getting the line number of an error in VBScript

Basically, I want my script to log any errors it encounters and log the line number of the error.  I'd like to do this just using VBScript.  Is this possible?
Avatar of dosth
dosth
Flag of India image

Avatar of judgeking

ASKER

Thanks, but I'm already doing this type of error checking, what I want is something like this:
'main VBScript code here
'... some code
'... some more code
 
If Err.Number <> 0 Then
   LogError Err.Number, Err.Description, Err.LineNumber
End If

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, you *are* judgeking....ignore that bit... :-)
OK, I didn't think it was possible to get the line number, but I just wanted a second opinion.  Thanks.