From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/lexLostCancelReportController.cls | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/force-app/main/default/classes/lexLostCancelReportController.cls b/force-app/main/default/classes/lexLostCancelReportController.cls
index e706a6e..8bc00ee 100644
--- a/force-app/main/default/classes/lexLostCancelReportController.cls
+++ b/force-app/main/default/classes/lexLostCancelReportController.cls
@@ -17,7 +17,6 @@
res.cntLostCancelDraft = opp.Cnt_Lost_cancel_Draft__c;
res.cntLostCancelReport = opp.Cnt_Lost_cancel_report__c;
} catch (Exception e) {
- throw new AuraHandledException(e.getMessage());
}
return res;
}
@@ -36,7 +35,6 @@
res.lostType = report.LostType__c;
res.reportStatus = report.Report_Status__c;
} catch (Exception e) {
- throw new AuraHandledException(e.getMessage());
}
return res;
}
@@ -54,21 +52,10 @@
return null;
} catch (Exception e) {
Database.rollback(sp);
- if (e.getMessage().contains(',')) {
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- String exc = '' + e.getMessage();
- Integer left = exc.indexOf(':') + 1;
- Integer right = exc.lastIndexOf(':');
- String str = exc.substring(left,right);
- left = str.indexOf(',') + 1;
- String newStr = str.substring(left);
- return newStr;
- }else {
- return e.getMessage();
- }
+ return e.getDmlMessage(0);
}
}
- class InitData {
+ public class InitData {
@AuraEnabled
public Decimal cntLostCancelReport;
@AuraEnabled
--
Gitblit v1.9.1