Merged PR 26794: Added increased error checking in CopyRDSLayerParameters service

Added increased error checking in CopyRDSLayerParameters service
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-09-24 17:12:27 +00:00
parent 3e0991f681
commit b83a3fb57b

View File

@ -1157,12 +1157,14 @@ Service CopyRDSLayerParameters(RDSNo)
CopyRDSLayerKeys = Xlate('RDS', CopyRDSNo, 'RDS_LAYER_KEYS', 'X')
If CopyRDSLayerKeys NE '' then
For each CopyRDSLayerKey in CopyRDSLayerKeys
Until ErrMsg NE ''
// Copy RDS layer records
LayerID = Field(CopyRDSLayerKey, '*', 2)
DestRDSLayerKey = RDSNo:'*':LayerID
CopyRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', CopyRDSLayerKey)
if Error_Services('NoError') then
DestRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', DestRDSLayerKey)
If Error_Services('NoError') then
DestRDSLayerRec<RDS_LAYER_DOPANT$> = CopyRDSLayerRec<RDS_LAYER_DOPANT$>
DestRDSLayerRec<RDS_LAYER_EPI_DILUENT$> = CopyRDSLayerRec<RDS_LAYER_EPI_DILUENT$>
DestRDSLayerRec<RDS_LAYER_EPI_TIME$> = CopyRDSLayerRec<RDS_LAYER_EPI_TIME$>
@ -1187,7 +1189,15 @@ Service CopyRDSLayerParameters(RDSNo)
DestRDSLayerRec<RDS_LAYER_MODIFY_USER$, -1> = 'CopyService'
DestRDSLayerRec<RDS_LAYER_MODIFY_DTM$, -1> = DateTime()
Database_Services('WriteDataRow', 'RDS_LAYER', DestRDSLayerKey, DestRDSLayerRec, True$, True$, True$)
If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage')
end
end else
ErrMsg = Error_Services('GetMessage')
end
end else
ErrMsg = Error_Services('GetMessage')
end
Next CopyRDSLayerKey
end
end else
@ -3381,3 +3391,4 @@ ClearCursors:
return