优化代码

This commit is contained in:
2025-09-13 19:29:17 +08:00
parent 879dfcea28
commit 98663422b1
6 changed files with 86 additions and 51 deletions
+9 -2
View File
@@ -578,9 +578,16 @@ namespace Ink_Canvas
_pptUIManager?.UpdateConnectionStatus(false);
});
}
catch (Exception ex)
catch (COMException comEx)
{
// COM对象已失效,这是正常情况,完全静默处理
var hr = (uint)comEx.HResult;
if (hr == 0x8001010E || hr == 0x80004005 || hr == 0x800706BA || hr == 0x800706BE || hr == 0x80048010)
{
}
}
catch (Exception)
{
LogHelper.WriteLogToFile($"处理演示文稿关闭事件失败: {ex}", LogHelper.LogType.Error);
}
}