<p>I am having an VB Script. I need to log the error information in a file. I need to log every information like error number error description and in which sub routine does the error occured.</p>

<p>Please provide some code</p>

For error handling in VBScript is used "On Error" clausule.
There are 3 ways, how to handle errors:
On Error Resume Next '' ignore errors
On Error GoTo 0 '' removes error handlning
On Error GoTo HandleError '' on error will code jump to specified signal
Samples:
```
```
On Error Resume Next '' ignore errors
SomeIgnorableFunction()

On Error GoTo 0 '' removes error ignoring
SomeImportantFunction()

On Error GoTo HandleError '' on error will code jump to specified signal
Dim a
a = 15 / 0

GoTo Finish '' skips error handling

HandleError:
Dim msg
Set msg = Err.Description & vbCrLf & Err.Number
MsgBox msg

Finish:
'' there is end of sciprt
```
```