Skip to content
New issue

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

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

Already on GitHub? # to your account

[windows] Unwrap error as windows error or otherwise return error message #186

Merged
merged 1 commit into from
May 9, 2023

Conversation

jsturtevant
Copy link
Collaborator

When using raw_os_error it will return Some() if it is an OS error otherwise it will return None and the error isn't related to OS failure. This handles it there won't be a panic in the case of a non OS error.

feedback based on #185 (comment). Will need to rebase/update this once #182 #185 merge

@jsturtevant jsturtevant changed the title Unwrap error as windows error or otherwise return error message [windows] Unwrap error as windows error or otherwise return error message Apr 25, 2023
@jsturtevant jsturtevant marked this pull request as draft April 25, 2023 21:01
@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4661bd1) 24.39% compared to head (57b2713) 24.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #186   +/-   ##
=======================================
  Coverage   24.39%   24.39%           
=======================================
  Files          17       17           
  Lines        2529     2529           
=======================================
  Hits          617      617           
  Misses       1912     1912           
Impacted Files Coverage Δ
src/error.rs 55.55% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

When using raw_os_error it will return Some() if it is an OS error otherwise it will return None and the error isn't related to OS failure. This handles it there won't be a panic in the case of a non OS error.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
@jsturtevant jsturtevant marked this pull request as ready for review May 1, 2023 16:28
Copy link
Member

@Tim-Zhang Tim-Zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @jsturtevant

@Tim-Zhang Tim-Zhang merged commit 6d8517a into containerd:master May 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants