@@ -204,16 +204,16 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu
204
204
pathForRetrieval, &encodeState);
205
205
if (err != CHIP_NO_ERROR)
206
206
{
207
- ChipLogError (DataManagement,
208
- " Error retrieving data from clusterId: " ChipLogFormatMEI " , err = %" CHIP_ERROR_FORMAT,
209
- ChipLogValueMEI (pathForRetrieval.mClusterId ), err.Format ());
210
-
211
207
// If error is not an "out of writer space" error, rollback and encode status.
212
208
// Otherwise, if partial data allowed, save the encode state.
213
209
// Otherwise roll back. If we have already encoded some chunks, we are done; otherwise encode status.
214
210
215
211
if (encodeState.AllowPartialData () && IsOutOfWriterSpaceError (err))
216
212
{
213
+ ChipLogDetail (DataManagement,
214
+ " List does not fit in packet, chunk between list items for clusterId: " ChipLogFormatMEI
215
+ " , attributeId: " ChipLogFormatMEI,
216
+ ChipLogValueMEI (pathForRetrieval.mClusterId ), ChipLogValueMEI (pathForRetrieval.mAttributeId ));
217
217
// Encoding is aborted but partial data is allowed, then we don't rollback and save the state for next chunk.
218
218
// The expectation is that RetrieveClusterData has already reset attributeReportIBs to a good state (rolled
219
219
// back any partially-written AttributeReportIB instances, reset its error status). Since AllowPartialData()
@@ -230,6 +230,11 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu
230
230
231
231
if (!IsOutOfWriterSpaceError (err))
232
232
{
233
+ ChipLogError (DataManagement,
234
+ " Fail to retrieve data, roll back and encode status on clusterId: " ChipLogFormatMEI
235
+ " , attributeId: " ChipLogFormatMEI " err = %" CHIP_ERROR_FORMAT,
236
+ ChipLogValueMEI (pathForRetrieval.mClusterId ), ChipLogValueMEI (pathForRetrieval.mAttributeId ),
237
+ err.Format ());
233
238
// Try to encode our error as a status response.
234
239
err = attributeReportIBs.EncodeAttributeStatus (pathForRetrieval, StatusIB (err));
235
240
if (err != CHIP_NO_ERROR)
@@ -239,6 +244,14 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu
239
244
attributeReportIBs.Rollback (attributeBackup);
240
245
}
241
246
}
247
+ else
248
+ {
249
+ ChipLogDetail (DataManagement,
250
+ " Next attribute value does not fit in packet, roll back on clusterId: " ChipLogFormatMEI
251
+ " , attributeId: " ChipLogFormatMEI " , err = %" CHIP_ERROR_FORMAT,
252
+ ChipLogValueMEI (pathForRetrieval.mClusterId ), ChipLogValueMEI (pathForRetrieval.mAttributeId ),
253
+ err.Format ());
254
+ }
242
255
}
243
256
}
244
257
SuccessOrExit (err);
0 commit comments