19626
2023-10-31 fd9df05c48c09b4d7f39a3b401882bda226dedea
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;
    }
@@ -55,20 +53,20 @@
        } 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();
            }
            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();
         }
        }
    }
    class InitData {
    public class InitData {
        @AuraEnabled
        public Decimal cntLostCancelReport;
        @AuraEnabled