Can I automatically throw descriptive exceptions with parameter values and class feild information?

I am prepared to be wrong about this, but I do not think it is possible to extract parameter values by walking the stack. You certainly cannot do this with the StackTrace and StackFrame classes.

I am prepared to be wrong about this, but I do not think it is possible to extract parameter values by walking the stack. You certainly cannot do this with the StackTrace and StackFrame classes. From a security perspective this makes sense because sensitive information could be embedded in the stack that unauthorized code should not have access to.

If the current stack frame does not catch the exception and record its parameter values into an Exception instance before rethrowing then I am afraid you are going to be out of luck.

I think you can use the CLR Debugging API to get out some more information than just the stacktrace, but I don't think it's easy. msdn.microsoft.com/en-us/library/bb38454....

Not sure if this is exactly what you are looking for, but as a consultant for AVIcode I can assure that it is a simple configuration change to collect parameters and member variables by namespace, class or method. You can even go as far as configuring diagnostic mode and collect local variables. Is this application in production?

In production but I would be specific to a class to enable.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions