Add errors last

This commit is contained in:
Chase Tucker
2025-08-26 09:10:15 -07:00
parent 47405863d7
commit a196bffd41
7 changed files with 152 additions and 163 deletions

View File

@ -456,6 +456,7 @@ Service AcknowledgeSupplement(SupplID, EntryUser)
StartTick = GetTickCount()
MetricName = 'AcknowledgeSupplement'
ErrMsg = ''
If ( (SupplID NE '') and (EntryUser NE '') ) then
OldRec = Xlate('SUPPLEMENTS', SupplID, '', 'X', '')
If OldRec NE '' then
@ -469,19 +470,21 @@ Service AcknowledgeSupplement(SupplID, EntryUser)
Supplement_Services('LogSupplementChange', NewRec, 'Acknowledged', EntryUser)
end else
Response = FALSE$
Error_Services('Add', 'Error editing Supplement record.')
ErrMsg = 'Error editing Supplement record.'
end
end else
Response = FALSE$
Error_Services('Add', 'Record does not exist.')
ErrMsg = 'Record does not exist.'
end
end else
Response = FALSE$
Error_Services('Add', 'SupplID or EntryUser was missing in the ' : Service : ' service.')
ErrMsg = 'SupplID or EntryUser was missing in the ' : Service : ' service.'
end
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service
@ -501,6 +504,7 @@ Service UnacknowledgedSupplementCheck(LotType=LOTTYPES, LotID, Stage=STAGES)
UnackList = ''
Response = False$
ErrMsg = ''
If ( (LotType NE '') and (LotID NE '') and (Stage NE '') ) then
KeyList = ''
Query = ''
@ -518,23 +522,25 @@ Service UnacknowledgedSupplementCheck(LotType=LOTTYPES, LotID, Stage=STAGES)
If AckField NE True$ then UnackList<-1> = Key
Next Key
end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS table.')
ErrMsg = 'Error in ':Service:' service. Error opening SUPPLEMENTS table.'
end
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Btree.Extract')
ErrMsg = 'Error in ':Service:' service. Error calling Btree.Extract'
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.')
ErrMsg = 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.'
end
end else
Error_Services('Add', 'LotType, LotID, or Stage was missing in the ' : Service : ' service.')
ErrMsg = 'LotType, LotID, or Stage was missing in the ' : Service : ' service.'
end
If UnackList NE '' then Response = UnackList
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service
@ -552,6 +558,7 @@ Service LogSupplementChange(SupplementRec, EditEvent, EntryUser)
StartTick = GetTickCount()
MetricName = 'LogSupplementChange'
ErrMsg = ''
If ( (SupplementRec NE '') and (EditEvent NE '') and (EntryUser NE '') ) then
SupplementText = SupplementRec<SUPPLEMENTS_SUPPL_TEXT$>
LotType = SupplementRec<SUPPLEMENTS_LOT_TYPE$>
@ -565,11 +572,13 @@ Service LogSupplementChange(SupplementRec, EditEvent, EntryUser)
End Case
end else
Error_Services('Add', 'LotType, LotID, or Stage was missing in the ' : Service : ' service.')
ErrMsg = 'LotType, LotID, or Stage was missing in the ' : Service : ' service.'
end
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service
@ -670,3 +679,4 @@ Service SendNotifications(RDSList, EditEvent, Instructions, EntryUser)
end service