diff --git a/src/UI/WPF/Views/AliasTreeControl.xaml.cs b/src/UI/WPF/Views/AliasTreeControl.xaml.cs index 581cc55..54d7a29 100644 --- a/src/UI/WPF/Views/AliasTreeControl.xaml.cs +++ b/src/UI/WPF/Views/AliasTreeControl.xaml.cs @@ -145,7 +145,7 @@ namespace NavisworksTransport.UI.WPF.Views _selectionHooked = true; } } - catch { /* 文档未就绪,跳过 */ } + catch (Exception ex) { LogManager.Debug($"[别名树] HookSelection事件异常: {ex.Message}"); } } private void UnhookSelectionEvents() @@ -158,7 +158,7 @@ namespace NavisworksTransport.UI.WPF.Views doc.CurrentSelection.Changed -= OnNavisSelectionChanged; } } - catch { } + catch (Exception ex) { LogManager.Debug($"[别名树] UnhookSelection异常: {ex.Message}"); } _selectionHooked = false; } @@ -1042,7 +1042,7 @@ namespace NavisworksTransport.UI.WPF.Views { Clipboard.SetText(node.OriginalName); } - catch { } + catch (Exception ex) { LogManager.Debug($"[别名树] Clipboard异常: {ex.Message}"); } } // ============================================================ @@ -1161,7 +1161,7 @@ namespace NavisworksTransport.UI.WPF.Views current = VisualTreeHelper.GetParent(current); } } - catch { } + catch (Exception ex) { LogManager.Warning($"[别名树] FindAncestor异常: {ex.GetType().Name}"); } return null; }