more info required from exceptions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H
When an exception is thrown I want to be able to retreive the line of code that raised the error (the actual code, not the line number) and the values of the parameters passed into the routine. Is this possible? The ex.StackTrace() does not produce this information

Regard
Sam
 
No, I don't think you can do that. It would probably be a security issue.
Besides, it's meaningless once it's being run because it's already compiled.


--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

Sam said:
Hi
When an exception is thrown I want to be able to retreive the line of code
that raised the error (the actual code, not the line number) and the values
of the parameters passed into the routine. Is this possible? The
ex.StackTrace() does not produce this information.
 
Hi Klaus

I need the information for debugging purposes. I believe the reflection namespace may be the way to go

Sam
 
I'm not saying you need it for something nefarious, just that I don't think
it's possible =)

Reflection works mostly on metadata. If you want readable code you'd have to
use the CodeDOM.


--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

Sam said:
Hi Klaus,

I need the information for debugging purposes. I believe the reflection
namespace may be the way to go.
 
Back
Top