J
James
We currently use Try/Catch blocks to handle exceptions, and when an
exception occurs, we write it to the database with the method name and other
information about the exception. We're currently changing the method name
in every method and I'd like to get away from that. I found this:
Dim st As New System.Diagnostics.StackTrace
Dim sf As System.Diagnostics.StackFrame = st.GetFrame(0)
Response.Write(sf.GetMethod().Name)
....which works, but I'd prefer to have this all in one central function
instead of copied/pasted 50 times per page. Is there any good way of doing
what I want to do?
Thanks
exception occurs, we write it to the database with the method name and other
information about the exception. We're currently changing the method name
in every method and I'd like to get away from that. I found this:
Dim st As New System.Diagnostics.StackTrace
Dim sf As System.Diagnostics.StackFrame = st.GetFrame(0)
Response.Write(sf.GetMethod().Name)
....which works, but I'd prefer to have this all in one central function
instead of copied/pasted 50 times per page. Is there any good way of doing
what I want to do?
Thanks