Skip to content

Commit

Permalink
Fix CA1031
Browse files Browse the repository at this point in the history
  • Loading branch information
Zagrthos committed Nov 6, 2024
1 parent 64d491c commit 47c7d91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ChatManager/Services/Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal static void Initialize()
{
Directory.CreateDirectory(LogPath);
}
catch (Exception ex)
catch (UnauthorizedAccessException ex)
{
ShowMessageBox.ShowLoggingBug(ex.Message);
Environment.Exit(0);
Expand Down
7 changes: 4 additions & 3 deletions ChatManager/Services/OpenWindows.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Security.Policy;
Expand Down Expand Up @@ -164,7 +165,7 @@ internal static void OpenExplorer(string path)
Process.Start("explorer.exe", path);
Logging.Write(LogEventEnum.Info, ProgramClassEnum.OpenWindows, $"explorer.exe started with path: {path}");
}
catch (Exception ex)
catch (Win32Exception ex)
{
Logging.Write(LogEventEnum.Error, ProgramClassEnum.OpenWindows, "explorer.exe failed to start!");
Logging.Write(LogEventEnum.ExMessage, ProgramClassEnum.OpenWindows, ex.Message);
Expand All @@ -183,7 +184,7 @@ internal static void OpenLinksInBrowser(string url)

Logging.Write(LogEventEnum.Info, ProgramClassEnum.OpenWindows, $"Browser started with url: {url}");
}
catch (Exception ex)
catch (Win32Exception ex)
{
Logging.Write(LogEventEnum.Error, ProgramClassEnum.OpenWindows, "Browser failed to start!");
Logging.Write(LogEventEnum.ExMessage, ProgramClassEnum.OpenWindows, ex.Message);
Expand All @@ -202,7 +203,7 @@ internal static void OpenProcess(string path)

Logging.Write(LogEventEnum.Info, ProgramClassEnum.OpenWindows, $"Process started with path: {path}");
}
catch (Exception ex)
catch (Win32Exception ex)
{
Logging.Write(LogEventEnum.Error, ProgramClassEnum.OpenWindows, "Process failed to start!");
Logging.Write(LogEventEnum.ExMessage, ProgramClassEnum.OpenWindows, ex.Message);
Expand Down
2 changes: 1 addition & 1 deletion ChatManager/runtimeconfig.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configProperties": {
"System.Runtime.TieredCompilation": true,
"System.Runtime.TieredCompilation.QuickJit": true,
"System.Runtime.TieredCompilation.QuickJitForLoops": true,
"System.Runtime.TieredCompilation.QuickJitForLoops": false,
"System.Globalization.Invariant": false,
"System.Net.Http.SocketsHttpHandler.Http2Support": true,
"System.Windows.Forms.AnchorLayoutV2": true,
Expand Down

0 comments on commit 47c7d91

Please sign in to comment.