Enhanced Error Checking

This commit is contained in:
Infineon\Ouellette
2025-08-13 14:35:00 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 09d2d13e63
commit a8dff61cfa
3 changed files with 69 additions and 47 deletions

View File

@ -3577,8 +3577,9 @@ end service
Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType) Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
ErrMsg = '' ErrMsg = ''
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
SLLReactors = '' SLLReactors = ''
If DtmToCheck NE '' then
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
If AllReactors NE '' then If AllReactors NE '' then
for each ReactNo in AllReactors using @FM for each ReactNo in AllReactors using @FM
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X') PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
@ -3609,6 +3610,13 @@ Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
end else end else
ErrMsg = 'No Reactor IDs found!' ErrMsg = 'No Reactor IDs found!'
end end
end else
ErrMsg = 'Datetime to check variable was null.'
end
If ErrMsg NE '' then
Error_Services('Add', ErrMsg)
end
Response = SLLReactors Response = SLLReactors

View File

@ -141,7 +141,12 @@ CreateHALItem:
//Single Load Lock Report from Metrology Services //Single Load Lock Report from Metrology Services
ReportStartDtm = Http_Services('GetQueryField', 'StartDate') ReportStartDtm = Http_Services('GetQueryField', 'StartDate')
ReportEndDtm = Http_Services('GetQueryField', 'EndDate') ReportEndDtm = Http_Services('GetQueryField', 'EndDate')
If ReportStartDtm NE '' AND ReportEndDtm NE '' then
RepJson = Report_Services('GetSLLReportJson', ReportStartDtm, ReportEndDtm) RepJson = Report_Services('GetSLLReportJson', ReportStartDtm, ReportEndDtm)
end else
Error_Services('Add', 'Missing parameters for report.')
end
Case Otherwise$ Case Otherwise$
Error_Services('Add', 'Unsupported report') Error_Services('Add', 'Unsupported report')
End Case End Case

View File

@ -2379,7 +2379,7 @@ Service GetSLLReportJson(FromDt, ToDt)
ErrorMessage = '' ErrorMessage = ''
SLLReportJson = '' SLLReportJson = ''
objSLLReportJson = '' objSLLReportJson = ''
If FromDt NE '' OR ToDt NE '' then
If SRP_Json(objSLLReportJson, 'New', 'Array') then If SRP_Json(objSLLReportJson, 'New', 'Array') then
For StartDt = FromDt to ToDt For StartDt = FromDt to ToDt
ThisDate = Date_Services('ConvertDateTimeToISO8601', StartDt) ThisDate = Date_Services('ConvertDateTimeToISO8601', StartDt)
@ -2399,6 +2399,15 @@ Service GetSLLReportJson(FromDt, ToDt)
Next StartDt Next StartDt
SLLReportJson = SRP_Json(objSLLReportJson, 'Stringify', 'Fast') SLLReportJson = SRP_Json(objSLLReportJson, 'Stringify', 'Fast')
SRP_Json(objSLLReportJson, 'Release') SRP_Json(objSLLReportJson, 'Release')
end else
ErrorMessage = 'Error creating the root JSON for the report.'
end
end else
ErrorMessage = 'From Date or To Date was null.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end end
Response = SLLReportJson Response = SLLReportJson