Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rafs: cleanup errors #1654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

liubogithub
Copy link
Collaborator

Based on the error definition, InvalidData is preferable than InvalidInput.

Data not valid for the operation were encountered. Unlike [InvalidInput], this typically means that the operation parameters were valid, however the error was caused by malformed input data. For example, a function that reads a file into a string will error with InvalidData if the file's contents are not valid UTF-8.

Relevant Issue (if applicable)

If there are Issues related to this PullRequest, please list it.

Details

Please describe the details of PullRequest.

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@liubogithub liubogithub requested a review from a team as a code owner December 13, 2024 07:02
@liubogithub liubogithub requested review from imeoer, jiangliu and gaius-qi and removed request for a team December 13, 2024 07:02
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.01%. Comparing base (acdf021) to head (5234d61).

Files with missing lines Patch % Lines
rafs/src/fs.rs 0.00% 5 Missing ⚠️
rafs/src/metadata/direct_v6.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1654      +/-   ##
==========================================
- Coverage   60.02%   60.01%   -0.01%     
==========================================
  Files         147      147              
  Lines       49583    49583              
  Branches    47037    47037              
==========================================
- Hits        29760    29756       -4     
- Misses      18041    18045       +4     
  Partials     1782     1782              
Files with missing lines Coverage Δ
api/src/config.rs 86.33% <100.00%> (ø)
api/src/error.rs 67.74% <ø> (ø)
rafs/src/metadata/direct_v6.rs 44.01% <0.00%> (ø)
rafs/src/fs.rs 34.19% <0.00%> (ø)

... and 1 file with indirect coverage changes

Based on the error definition, InvalidData is preferable than InvalidInput.

Data not valid for the operation were encountered.
Unlike [InvalidInput], this typically means that the operation parameters were valid, however the error was caused by malformed input data.
For example, a function that reads a file into a string will error with InvalidData if the file's contents are not valid UTF-8.

Signed-off-by: Liu Bo <[email protected]>
With error macros, debug mode can show more informations such as stack trace.

Signed-off-by: Liu Bo <[email protected]>
@liubogithub liubogithub changed the title rafs: unify error code rafs: cleanup errors Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant