G
Guest
Is there any way to get somehow values of method paramter
in which exception has been thrown
example
public void Foo(int ala, string ola
try
//..
throw new Exception()
//..
catch(Exception ex
LogExceptionData(ex)
public void LogExceptionData(Exception ex
tw.WriteLine(ex.Message)
if(ex.TargetSite!=null
tw.Write(ex.TargetSite.DeclaringType.Name)
tw.Write(".")
tw.Write(ex.TargetSite.Name)
tw.WriteLine("()")
//AND NOW, I would like to save values of the
//parameters of method in which exception has been throw
//Iterate through values collection, but how to get them
tw.WriteLine(....
I can get parameter type collecion, however I'd like to get their values
Thanks
Michał Januszczyk
in which exception has been thrown
example
public void Foo(int ala, string ola
try
//..
throw new Exception()
//..
catch(Exception ex
LogExceptionData(ex)
public void LogExceptionData(Exception ex
tw.WriteLine(ex.Message)
if(ex.TargetSite!=null
tw.Write(ex.TargetSite.DeclaringType.Name)
tw.Write(".")
tw.Write(ex.TargetSite.Name)
tw.WriteLine("()")
//AND NOW, I would like to save values of the
//parameters of method in which exception has been throw
//Iterate through values collection, but how to get them
tw.WriteLine(....
I can get parameter type collecion, however I'd like to get their values
Thanks
Michał Januszczyk