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

Removes get_io_error() #34863

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

brooksprumo
Copy link
Contributor

Problem

get_io_error()'s name is somewhat confusing, and the function is also limited by only supporting str string inputs. It also always logs a warn!(), but often the callers will also log the error later, which is redundant.

Summary of Changes

Replace get_io_error() with std::io::Error::other(), which accepts anything that implements std::error::Error. Also add more information to these errors.

@brooksprumo brooksprumo self-assigned this Jan 19, 2024
@brooksprumo brooksprumo marked this pull request as ready for review January 19, 2024 22:09
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 104 lines in your changes are missing coverage. Please review.

Comparison is base (9d13244) 81.7% compared to head (83dc4e6) 81.7%.
Report is 17 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34863   +/-   ##
=======================================
  Coverage    81.7%    81.7%           
=======================================
  Files         826      826           
  Lines      223114   223185   +71     
=======================================
+ Hits       182335   182411   +76     
+ Misses      40779    40774    -5     

@brooksprumo brooksprumo merged commit c264307 into solana-labs:master Jan 22, 2024
35 checks passed
@brooksprumo brooksprumo deleted the snap/errors/get_io_error branch January 22, 2024 19:07
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.

2 participants