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

Better error type #82

Merged
merged 12 commits into from Jan 4, 2020
Merged

Better error type #82

merged 12 commits into from Jan 4, 2020

Conversation

letmutx
Copy link
Collaborator

@letmutx letmutx commented Dec 29, 2019

Fixes #79

I may have gone a bit overboard refactoring the binary protocol. Sorry about that!

The issue with returning same errors in both ASCII and binary protocol is that the format of errors is different. We should instead document that the errors returned by both the protocols may be different but guarantee that the same error is returned in the future versions too for compatibility.

@codecov-io
Copy link

codecov-io commented Dec 29, 2019

Codecov Report

Merging #82 into master will decrease coverage by 1.15%.
The diff coverage is 30.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
- Coverage   55.36%   54.21%   -1.16%     
==========================================
  Files          11       11              
  Lines         587      629      +42     
==========================================
+ Hits          325      341      +16     
- Misses        262      288      +26
Impacted Files Coverage Δ
src/lib.rs 0% <ø> (ø) ⬆️
src/value.rs 54.54% <ø> (ø) ⬆️
src/protocol/ascii.rs 0% <0%> (ø) ⬆️
src/error.rs 8.64% <10%> (+8.64%) ⬆️
src/client.rs 95.71% <100%> (+1.19%) ⬆️
src/protocol/mod.rs 75% <66.66%> (-8.34%) ⬇️
src/protocol/binary.rs 81.7% <80%> (+3.8%) ⬆️
src/protocol/binary_packet.rs 93.58% <90%> (+10.04%) ⬆️

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 8c2bf93...f370f9f. Read the comment docs.

@letmutx letmutx changed the title WIP: Better error type Better error type Dec 29, 2019
@aisk
Copy link
Owner

aisk commented Dec 30, 2019

Epic work! But sorry I'm still got busy in work. Will review it in next holiday.

@aisk aisk self-requested a review December 30, 2019 12:20
@letmutx
Copy link
Collaborator Author

letmutx commented Dec 30, 2019

No hurry, take your time!

@letmutx
Copy link
Collaborator Author

letmutx commented Jan 1, 2020

rebased with latest master

src/error.rs Outdated Show resolved Hide resolved
src/protocol/ascii.rs Outdated Show resolved Hide resolved
src/error.rs Show resolved Hide resolved
@aisk aisk merged commit 2a01adf into aisk:master Jan 4, 2020
@aisk
Copy link
Owner

aisk commented Jan 4, 2020

Merged, thank for contributions! @letmutx

@letmutx letmutx deleted the better-error-type branch January 4, 2020 17:36
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.

Refactor the error system
3 participants