diff --git a/src/modules/launcher/Wox.Plugin/Common/DefaultBrowserInfo.cs b/src/modules/launcher/Wox.Plugin/Common/DefaultBrowserInfo.cs index 92b5cf4349..45e3578a41 100644 --- a/src/modules/launcher/Wox.Plugin/Common/DefaultBrowserInfo.cs +++ b/src/modules/launcher/Wox.Plugin/Common/DefaultBrowserInfo.cs @@ -187,7 +187,7 @@ namespace Wox.Plugin.Common if (string.IsNullOrEmpty(Path)) { - throw new Exception("Browser path is null or empty."); + throw new ArgumentOutOfRangeException(nameof(Path), "Browser path is null or empty."); } } catch (Exception e) @@ -217,7 +217,7 @@ namespace Wox.Plugin.Common return stringBuilder.ToString(); } - throw new Exception("Could not load indirect string."); + throw new ArgumentNullException(nameof(Path), "Could not load indirect string."); } } } diff --git a/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs b/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs index 9f8b08c4a7..504683d89e 100644 --- a/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs +++ b/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs @@ -801,9 +801,9 @@ namespace Wox.Plugin.Common.Win32 return !r1.Equals(r2); } - public bool Equals(RECT r) + public bool Equals(RECT other) { - return r.Left == Left && r.Top == Top && r.Right == Right && r.Bottom == Bottom; + return other.Left == Left && other.Top == Top && other.Right == Right && other.Bottom == Bottom; } public override bool Equals(object obj) diff --git a/src/modules/launcher/Wox.Plugin/Constant.cs b/src/modules/launcher/Wox.Plugin/Constant.cs index 8aefc427b4..f66d9b36ad 100644 --- a/src/modules/launcher/Wox.Plugin/Constant.cs +++ b/src/modules/launcher/Wox.Plugin/Constant.cs @@ -18,7 +18,7 @@ namespace Wox.Plugin { if (obj == null) { - throw new NullReferenceException(); + throw new ArgumentNullException(nameof(obj)); } else { diff --git a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj index 0944b1a81f..d946dcc4bf 100644 --- a/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj +++ b/src/modules/launcher/Wox.Plugin/Wox.Plugin.csproj @@ -14,6 +14,8 @@ false x64 en-US + true + Recommended