mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-16 01:08:03 +08:00
Remove unimportant UnobservedTaskException #1691
This commit is contained in:
+2
-16
@@ -117,22 +117,8 @@ public partial class App : Application
|
|||||||
// Exception handling events which are not caught in the Task thread
|
// Exception handling events which are not caught in the Task thread
|
||||||
TaskScheduler.UnobservedTaskException += (_, e) =>
|
TaskScheduler.UnobservedTaskException += (_, e) =>
|
||||||
{
|
{
|
||||||
try
|
ProcessHelper.WriteLog(e.Exception.ToString());
|
||||||
{
|
e.SetObserved();
|
||||||
ProcessHelper.WriteLog(e.Exception.ToString());
|
|
||||||
Current?.Dispatcher?.BeginInvoke(() =>
|
|
||||||
{
|
|
||||||
Wpf.Ui.Violeta.Controls.ExceptionReport.Show(e.Exception);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
ProcessHelper.WriteLog(ex.ToString());
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
e.SetObserved();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Exception handling events which are not caught in UI thread
|
// Exception handling events which are not caught in UI thread
|
||||||
|
|||||||
Reference in New Issue
Block a user