pisceswzh
Well-known member
- Joined
- Mar 19, 2007
- Messages
- 96
- Programming Experience
- 1-3
Hi,
I am working on a project that need to send a bug report to the administrator whenever it happens. So I use a TRY...CATCH... to catch the bug and send an email to the administrator.
For the time being, I relize it by:
Class ClassLoad
Private Sub subLoad()
Try
* codes
Catch ex as Exception
subSendEmail([Email Subject], [Email Body])
End Catch
End Sub
End Class
In the [Email Subject], I want it to be ClassName.SubName. Here it would be ClassLoad.subLoad.
In the [Email Body], I will use ex.message.
The problem is in the [Email Subject]. I don't know how to get the ClassName and the SubName. For the time being, I can only hardcode it. Is there a way to get the ClassName and the SubName using a variable or something?
Thanks!
I am working on a project that need to send a bug report to the administrator whenever it happens. So I use a TRY...CATCH... to catch the bug and send an email to the administrator.
For the time being, I relize it by:
Class ClassLoad
Private Sub subLoad()
Try
* codes
Catch ex as Exception
subSendEmail([Email Subject], [Email Body])
End Catch
End Sub
End Class
In the [Email Subject], I want it to be ClassName.SubName. Here it would be ClassLoad.subLoad.
In the [Email Body], I will use ex.message.
The problem is in the [Email Subject]. I don't know how to get the ClassName and the SubName. For the time being, I can only hardcode it. Is there a way to get the ClassName and the SubName using a variable or something?
Thanks!