Return metadata for MCOS objects instead of throwing error if read is unsuccessful #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a try-catch block for
load_subsys!()andload_mcos_object(). Any errors caught will log a warning and return raw metadata instead. This could work as a fix towards #219Added test cases for both v7 and v7.3 formats:
corrupted_subsystem.matcontains an unsupported FileWrapper version (v5) which should throw an error.corrupted_mcos_object_metadata.matcontains an object ID that does not exist in subsystem which should lead to a BoundsError.It would be a good idea to test for the specific warning message but I couldn't figure out how to do that with
@test_logs