Reflection and Error Logging

  • Thread starter Thread starter Ryan Timmins
  • Start date Start date
R

Ryan Timmins

I would like to write an exception handler that can write out the
stacktrace and the value of the local variables for each method in the
stack. I was thinking reflection might be able to do this, but I
haven't found anything yet.

Does anyone have any code or advice on how to do this ?
 
Ryan,

You can't access values local to a stack when walking through the stack.
If you want to write the values of local variables, then you are going to
have to have the code tell you what the values of those variables are, as
they are not exposed through reflection (or anywhere else, for that matter).

Hope this helps.
 
Back
Top