csnemes / tracer

Tracing rewriter using Fody
Apache License 2.0
93 stars 26 forks source link

Add ability to disable log exception #78

Open dengber opened 5 years ago

dengber commented 5 years ago

The "try{...}catch(Exception e){log(e);throw;}" waved into code cause wrong line number of exception stack trace.

Please refer the flowing URL for detailed reason. https://stackoverflow.com/questions/28481577/postsharps-onexceptionaspect-is-corrupting-the-stack-traces-line-numbers/28541633 https://support.postsharp.net/request/21942-exception-line-number-at-end-of

Can you add the ability to disable log exception when user prefer to disable it?

csnemes commented 5 years ago

Yes of course, I'll put it into the next iteration. Also I'll try to see if using the ExceptioDispatchInfo class can fix this problem.

dengber commented 5 years ago

Thanks!