NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
863 stars 171 forks source link

Automatically saving all values in Exception.Data #45

Closed AkosLukacs closed 10 years ago

AkosLukacs commented 10 years ago

I know, that these could be done with CustomData, or OnBeforeLog, but I think it's convenient to save these by default.

Also saving SqlException.Procedure, for anyone using SPs...

NickCraver commented 10 years ago

Leaving out the .Data collection by default is very intentional behavior. This is something we don't want to save by default.

Many exceptions throw things in .Data, since that could be serialization chain or useless message as well. There are also other issues like form data with passwords, etc. that aren't desirable to include - that's why I explicitly have opt-in behavior here.

The .Procedure (behind an if check) is a good include though - if you split that into another pull request I'll happily accept it.

AkosLukacs commented 10 years ago

Created an another pull