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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top