将 NotificationHelper.ShowMessage改为具体的ShowError得方法

This commit is contained in:
2025-07-06 15:36:53 +08:00
parent b0874a4f02
commit 0980f84d09
13 changed files with 45 additions and 55 deletions

View File

@@ -201,9 +201,7 @@ public class DeviceRepository
// 中间出错了 回滚
await db.RollbackTranAsync();
// 捕获并记录所有未预期的异常
string errorMsg = $"在添加设备过程中发生预期错误:";
Logger.Error(errorMsg + e);
NotificationHelper.ShowMessage(errorMsg + e.Message, NotificationType.Error);
NotificationHelper.ShowError("添加设备过程中发生了不可预期错误:" + e.Message, e);
}
finally
{