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

Implement std::error::Error for our custom errors #1422

Merged
merged 1 commit into from Mar 18, 2020

Conversation

otavio
Copy link
Contributor

@otavio otavio commented Mar 18, 2020

For allowing a more ergonomic use and better integration on the
ecosystem, this adds the std::error::Error impl for our custom
errors.

We intent to drop this hand made code once derive_more finishes the
addition of the Error derive support[1]. Until that is available, we
need to live with that.

  1. deriving Error JelteF/derive_more#92

@codecov-io
Copy link

Codecov Report

Merging #1422 into master will decrease coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1422      +/-   ##
==========================================
- Coverage   47.95%   47.83%   -0.13%     
==========================================
  Files         137      137              
  Lines       12805    12851      +46     
==========================================
+ Hits         6141     6147       +6     
- Misses       6664     6704      +40     
Impacted Files Coverage Δ
actix-http/src/client/error.rs 0.00% <ø> (ø)
actix-http/src/error.rs 32.23% <ø> (ø)
actix-http/src/ws/mod.rs 0.00% <ø> (ø)
awc/src/error.rs 0.00% <ø> (ø)
src/error.rs 87.50% <ø> (ø)
actix-http/src/httpcodes.rs 22.91% <0.00%> (-77.09%) ⬇️
actix-http/src/h1/codec.rs 69.44% <0.00%> (-1.39%) ⬇️
actix-http/src/h1/client.rs 66.27% <0.00%> (-1.17%) ⬇️
actix-http/src/message.rs 67.05% <0.00%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d958fa...8ca1377. Read the comment docs.

@JohnTitor
Copy link
Member

Looks good! Could you also update changelogs?

For allowing a more ergonomic use and better integration on the
ecosystem, this adds the `std::error::Error` `impl` for our custom
errors.

We intent to drop this hand made code once `derive_more` finishes the
addition of the Error derive support[1]. Until that is available, we
need to live with that.

1. JelteF/derive_more#92

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
@otavio otavio force-pushed the topic/impl-error-more-types branch from 8ca1377 to 146ae4d Compare March 18, 2020 03:22
@JohnTitor
Copy link
Member

One entry for each affected module?

Your update looks great!

@otavio
Copy link
Contributor Author

otavio commented Mar 18, 2020

Looks good! Could you also update changelogs?

Sure. I added one entry for each changed crate. Let me know if any other change needs to be done.

@JohnTitor JohnTitor requested a review from a team March 18, 2020 03:26
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

👍

@JohnTitor JohnTitor merged commit bf630d9 into actix:master Mar 18, 2020
@otavio otavio deleted the topic/impl-error-more-types branch March 19, 2020 01:32
@Dowwie
Copy link
Contributor

Dowwie commented Mar 28, 2020

@JohnTitor @otavio derive_more now features std::Error derivation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants