S
Steve Amey
Hi all
I would like to get the values of Parameters passed to a method from a
centralized exception handling routine. At the moment, the exception is
passed to the handler, and I can get the stack and find out which methods
are in it and what parameters those methods take, but I would really like to
know the values of the parameters, something like below:
HandleException(Exception Ex = MyCustomException)
FillFromDataBase(Integer pkValue = 1)
Main()
If I have a look in the VS.NET designer when debugging, I can see the values
of the parameters. It would be really useful, for logging purposes, to know
the values of the parameters in the exception handler rather than putting
code in each method.
I've looked around for this and saw some-one post a response to a similar
question saying that this is not possible unless you use the Debugging API,
is this true? If it is true, does anyone know of any resources or have any
code samples of how it's done? I can't believe that I'm the first person who
wants to do this, so if it can be done then I'm sure some-one has done it
already!!
Thank you.
Kind Regards,
Steve.
I would like to get the values of Parameters passed to a method from a
centralized exception handling routine. At the moment, the exception is
passed to the handler, and I can get the stack and find out which methods
are in it and what parameters those methods take, but I would really like to
know the values of the parameters, something like below:
HandleException(Exception Ex = MyCustomException)
FillFromDataBase(Integer pkValue = 1)
Main()
If I have a look in the VS.NET designer when debugging, I can see the values
of the parameters. It would be really useful, for logging purposes, to know
the values of the parameters in the exception handler rather than putting
code in each method.
I've looked around for this and saw some-one post a response to a similar
question saying that this is not possible unless you use the Debugging API,
is this true? If it is true, does anyone know of any resources or have any
code samples of how it's done? I can't believe that I'm the first person who
wants to do this, so if it can be done then I'm sure some-one has done it
already!!
Thank you.
Kind Regards,
Steve.