From 6a1318602eeb8c63f732f1b015e3061cfbf8c2f0 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Tue, 9 Jun 2026 02:40:35 +0800 Subject: [PATCH] fix: pass through exception message directly instead of generic wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BuildFromFaceNormal already provides specific error like '面法向与光轴平行' - Catch now shows raw ex.Message instead of prefixing with generic text --- src/UI/WPF/ViewModels/PathEditingViewModel.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/UI/WPF/ViewModels/PathEditingViewModel.cs b/src/UI/WPF/ViewModels/PathEditingViewModel.cs index b0de2cd..2c652ed 100644 --- a/src/UI/WPF/ViewModels/PathEditingViewModel.cs +++ b/src/UI/WPF/ViewModels/PathEditingViewModel.cs @@ -2500,11 +2500,11 @@ namespace NavisworksTransport.UI.WPF.ViewModels { LogManager.Error($"[直线装配] 端面分析失败: {ex.Message}", ex); DialogHelper.ShowStatusAndDialog( - $"端面分析失败: {ex.Message}", + ex.Message, "取端面失败", - $"端面分析失败: {ex.Message}\n请确保点击的是终点箱体的平整端面。", + ex.Message, UpdateMainStatus, - System.Windows.MessageBoxImage.Error, + System.Windows.MessageBoxImage.Warning, 5000); } finally @@ -2630,11 +2630,11 @@ namespace NavisworksTransport.UI.WPF.ViewModels LogManager.Error($"[直线装配] 安装面分析失败: {ex.Message}", ex); CleanupAssemblyInstallationSelection(); DialogHelper.ShowStatusAndDialog( - $"安装面分析失败: {ex.Message}", + ex.Message, "选安装面失败", - $"安装面分析失败: {ex.Message}\n请确保点击的是终点箱体表面的平整区域。", + ex.Message, UpdateMainStatus, - System.Windows.MessageBoxImage.Error, + System.Windows.MessageBoxImage.Warning, 5000); } }