HI,
I'm trying to log each error produced by my app. I want to log:
1. Err.description
2. The Class/Form name
3. The Function/Sub name
My code for a typical routine looks something like this
Function DoSomething()
Try
'Do stuff
Catch
LogError(err.Description, "form or class Name", "Function or sub name"
End try
End Function
The LogError will log the error in my database.
What I would like to be able to do is reduce my typing. Where I would normally have to type the name of the Form/Class and Function/Sub, I was wondering if this could be done automatically, like how err.description gets you the full description of the error. Me.text will get me my form name, but I cannot find (and suspect there may not be) a way to automatically determine the name of the routine or class.
Thanks
Peter
I'm trying to log each error produced by my app. I want to log:
1. Err.description
2. The Class/Form name
3. The Function/Sub name
My code for a typical routine looks something like this
Function DoSomething()
Try
'Do stuff
Catch
LogError(err.Description, "form or class Name", "Function or sub name"
End try
End Function
The LogError will log the error in my database.
What I would like to be able to do is reduce my typing. Where I would normally have to type the name of the Form/Class and Function/Sub, I was wondering if this could be done automatically, like how err.description gets you the full description of the error. Me.text will get me my form name, but I cannot find (and suspect there may not be) a way to automatically determine the name of the routine or class.
Thanks
Peter