In a .net Exception how to get a stacktrace with argument values

前端 未结 11 1436
南方客
南方客 2020-12-01 01:58

I am trying to add an unhandled exception handler in .net (c#) that should be as helpfull for the \'user\' as possible. The end users are mostly programers so they just need

11条回答
  •  一个人的身影
    2020-12-01 02:33

    I don't think System.Diagnostics.StackFrame supplies argument information (other than the method signature).

    You could instrument the troublesome calls with trace logging via AOP, or even use its exception interception features to conditionally log without having to litter your code. Have a look around http://www.postsharp.org/.

提交回复
热议问题