This commit is contained in:
2025-12-31 16:38:02 +08:00
parent 295f8f56e3
commit 5903bab81f
2 changed files with 55 additions and 2 deletions
+12 -1
View File
@@ -360,7 +360,18 @@ namespace Ink_Canvas
try
{
var clientObj = HitokotoHttpClient.Value;
object clientObj = null;
try
{
clientObj = HitokotoHttpClient.Value;
}
catch (Exception initEx)
{
LogHelper.WriteLogToFile($"HTTP 客户端初始化失败: {initEx.Message}", LogHelper.LogType.Warning);
BlackBoardWaterMark.Text = "一言功能不可用(缺少 System.Net.Http";
return;
}
if (clientObj == null || !(clientObj is HttpClient client))
{
BlackBoardWaterMark.Text = "一言功能不可用(缺少 System.Net.Http";