C
chris
I am sure I am overlooking something simple, but here goes. In the
global.asax file I have some code in the Application_Error method that
reads information out of the current exception and emails it to me. I
want to see what the parameter values are for the method throwing the
exception. I am using reflection to get the parameter metadata, but
this does not do me much good.
Exception ex = Server.GetLastError().GetBaseException();
MethodInfo mi =
(MethodInfo)MethodInfo.GetMethodFromHandle(ex.TargetSite.MethodHandle);
ParameterInfo[] parameters = mi.GetParameters();
Lets say the method throwing the exception has the following signature.
public void MyMethod(string foo, string bar)
The exception is thrown when the values are foo = "something" and bar =
"something else"
How do I find the values of foo and bar at runtime in Application_Error
method?
TIA,
Chris
global.asax file I have some code in the Application_Error method that
reads information out of the current exception and emails it to me. I
want to see what the parameter values are for the method throwing the
exception. I am using reflection to get the parameter metadata, but
this does not do me much good.
Exception ex = Server.GetLastError().GetBaseException();
MethodInfo mi =
(MethodInfo)MethodInfo.GetMethodFromHandle(ex.TargetSite.MethodHandle);
ParameterInfo[] parameters = mi.GetParameters();
Lets say the method throwing the exception has the following signature.
public void MyMethod(string foo, string bar)
The exception is thrown when the values are foo = "something" and bar =
"something else"
How do I find the values of foo and bar at runtime in Application_Error
method?
TIA,
Chris