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

refactor: change error handling to be strongly-typed #1834

Merged
merged 8 commits into from
Jan 7, 2025

Conversation

ClaytonKnittel
Copy link
Contributor

Hi! New contributor to this project here.

This PR refactors error handling in the local/manager/server binaries, resulting in a net reduction of 26 lines of code.

@ClaytonKnittel
Copy link
Contributor Author

I'm unsure if this is a breaking change, this is modifying the signatures of pub functions in src/ and removing the pub const error codes. Feedback is welcome!

@zonyitoo
Copy link
Collaborator

zonyitoo commented Jan 6, 2025

LGTM. Please add doc comments for structs, methods and the mod itself.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Jan 6, 2025

And what's the actual use-case of the error type? Do you actually use it as a library?

@ClaytonKnittel
Copy link
Contributor Author

Done.

The error type is not intended to be used outside of the code I've modified. I've changed the package visibility of mod error to package-local.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Jan 7, 2025

@ClaytonKnittel Please fix windows build.

@ClaytonKnittel
Copy link
Contributor Author

Fixed.

@zonyitoo zonyitoo merged commit 8416f6d into shadowsocks:master Jan 7, 2025
17 checks passed
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