Bläddra i källkod

Hack to stop FastReports.WPF filling up the logs with stupid error messages

frogsoftware 1 år sedan
förälder
incheckning
1d7ada80ea
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      prs.desktop/App.xaml.cs

+ 4 - 0
prs.desktop/App.xaml.cs

@@ -320,6 +320,10 @@ namespace PRSDesktop
 
         private void LogUnhandledException(Exception exception, string source)
         {
+            // Hacky Hack Hack FastReport.WPF throwing errors here
+            if (exception.Message.Contains("Must create DependencySource on same Thread as the DependencyObject."))
+                return;
+            
             var messages = new List<string>();
             var e2 = exception;
             while (e2 != null)