Skip to content

Commit

Permalink
Provide more details about the record we could not read
Browse files Browse the repository at this point in the history
Summary: When we fail to read a record, it can be useful to log more about the record that failed.

Reviewed By: maxouellet

Differential Revision: D60998889

fbshipit-source-id: f716e35383b64d4f0d252935c981ca0144e35033
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Aug 10, 2024
1 parent d7277ae commit 4bad1a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vrs/RecordFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,13 @@ int RecordFileReader::readRecord(
error = reader->read(dataReference, readSize);
if (error != 0) {
reader->finish();
XR_LOGE("Read failed: {}", errorCodeToMessageWithCode(error));
XR_LOGE(
"Reading {} record #{} failed. Stream {} @ {:.3f}: {}",
toString(recordInfo.recordType),
getRecordIndex(&recordInfo),
recordInfo.streamId.getNumericName(),
recordInfo.timestamp,
errorCodeToMessageWithCode(error));
return error;
}
}
Expand Down

0 comments on commit 4bad1a8

Please sign in to comment.