fix: no silent catch - log all exceptions
This commit is contained in:
parent
6a3be184a6
commit
ea49774f39
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user