Ticket Q235422
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Validation - Do not write validation exceptions to the application log file

Validation Exception - do not write it to logfile

created 15 years ago

Hi,
we rollout an App for testing now - there are about 80 Users. Since i check the Logs currently to find possible errors - i see that there are also ValidationExceptions reported in the Log as Error. For me that makes no sense. I set the Logging Level to 1 (Error) - so i expect only Errors there. The ValidationExceptions i would want to see if i set LogLevel to Verbose - what do you think? I also see the ValidationModule sets this:
public override void Setup(XafApplication application) {
               base.Setup(application);
               application.IgnoredExceptions.Add(typeof(ValidationException));
          }
But i cant find where IgnoredExceptions is used in the XafApplication.
So what do you suggest to work around here? Override the protected virtual Exception PreprocessException(Exception e) in the WinAPplication?
thx
Noxe

Show previous comments (1)
M M
Martin Praxmarer - DevExpress MVP 15 years ago

    Hi Roman,
    i have overridden the PreprocessException method - but i have noticed that i have still ValidationExceptions in my logfile. If the user creates or modifies an object, if he close the window an confirmation message appear "Do you want to save". if use presses here yes - the object gets validated but i cannot catch the exception. This happens because in the WinWindow.cs - DoOnFormClosing - the exception is written directly into the tracer:
          catch (Exception exception)
          {
            Tracing.Tracer.LogError(exception);
    Any reason for this?

    DevExpress Support Team 15 years ago

      Hello Martin,
      With the current design, tracing is hardcoded in a number of places. This is one of them. I don't know a workaround that would allow you to filter exception logging in all scenarios. So, I'm afraid, we need to wait until the suggestion is implemented.
      Thanks,
      Roman P

      KK KK
      Krzysztof Krzyzsłof 12 years ago

        Please see my ready-to-use workaround from:

        http://www.devexpress.com/Support/Center/Question/Details/S33691

        Thanks,
        Krzysztof

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.