T
Tor Inge Rislaa
Finding current Procedure
I want to write errors to a log-file, where the error log contain the
description of where the error occurred and what kind of error it was.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
On Error GoTo errHandler
'Some code
If Somthing Then
"do this"
Else
"do that"
End If
Exit Sub
errHandler:
myPrintToFileProcedure("Error:" & Err.Number & " - " & Err.Description & "
in procedure Button1_Click")
End Sub
Is it possible to get the text Button1_Click dynamically from the procedure
that raise the error, so that this don't need to be hardcoded?
TIRislaa
I want to write errors to a log-file, where the error log contain the
description of where the error occurred and what kind of error it was.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
On Error GoTo errHandler
'Some code
If Somthing Then
"do this"
Else
"do that"
End If
Exit Sub
errHandler:
myPrintToFileProcedure("Error:" & Err.Number & " - " & Err.Description & "
in procedure Button1_Click")
End Sub
Is it possible to get the text Button1_Click dynamically from the procedure
that raise the error, so that this don't need to be hardcoded?
TIRislaa