For some exception types (OperationTimeoutException, DeadlockException, ...), the exception message contains the complete SQL of the query that was being executed.

While this can useful to debug, it can also reduce log readability.

Is there an option to enabled/disable getting the sql in exception .ToString() output? If not, would it be possible to add this option?

asked Dec 08 '11 at 11:17

olorin's gravatar image

olorin
358878792


2 Answers:

Feature is implemented and will be included in the upcoming v4.4.2 release along with several bugfixes and PostSharp 2.1

DomainConfiguration.IncludeSqlInExceptions could be set to false to disable current behavior. Also you can use includeSqlInExceptions XML attribute in <domain> section.

answered Jan 27 '12 at 01:33

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov
179325

1

Thank you!

(Jan 27 '12 at 02:59) olorin olorin's gravatar image

Hello olorin,

There is no such option for now. We'll consider implementing this option in next minor update. It should pretty trivial and non-intrusive to implement.

answered Dec 09 '11 at 03:46

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov
179325

edited Dec 09 '11 at 03:50

Thank you, I think we will find it useful!

(Dec 09 '11 at 04:47) olorin olorin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA