mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-29 02:06:48 +08:00
Revert "Specify exception types in catch blocks for better error handling"
This reverts commit b3ee2cf020.
This commit is contained in:
@@ -25,7 +25,6 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -135,8 +134,7 @@ public partial class App : Application
|
||||
if (Directory.Exists(path) || File.Exists(path))
|
||||
PipeServerManager.SendMessage(PipeMessages.Toggle, path);
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException || ex is SecurityException ||
|
||||
ex is NotSupportedException || ex is PathTooLongException)
|
||||
catch
|
||||
{
|
||||
// Invalid path, ignore
|
||||
}
|
||||
@@ -314,8 +312,7 @@ public partial class App : Application
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException || ex is SecurityException ||
|
||||
ex is NotSupportedException || ex is PathTooLongException)
|
||||
catch
|
||||
{
|
||||
// Invalid path, continue to show duplicate message
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user