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
We have closed this ticket because another page addresses its subject:
Validation - Do not write validation exceptions to the application log file
Hello Martin,
The proposed behavior makes sense. I've registered a corresponding suggestion on your behalf - Validation - Do not write validation exceptions to the application log file.
As a workaround for a Windows Forms application you can override the PreprocessException method.
Thanks,
Roman P
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?
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
Please see my ready-to-use workaround from:
http://www.devexpress.com/Support/Center/Question/Details/S33691
Thanks,
Krzysztof