fix: pass through exception message directly instead of generic wrapper

- BuildFromFaceNormal already provides specific error like '面法向与光轴平行'
- Catch now shows raw ex.Message instead of prefixing with generic text
This commit is contained in:
tian 2026-06-09 02:40:35 +08:00
parent 9e1056b92c
commit 6a1318602e

View File

@ -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);
}
}