-
Notifications
You must be signed in to change notification settings - Fork 45
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: remove StunError
#472
Comments
I think that's going the wrong way, losing semantics. I think instead we should make specific Parse error codes for the various problems instead of relying on a string description. |
Is that really useful? It is not like a parse error can be corrected, i.e. matched upon. Modelling each error out as a variant is very desxriptive but as a user, you just end up logging / bubbling it up anyway. Hence the thinking of making the API simpler. |
It makes for better testing. No text matching. |
It looks ugly to compare |
I prefer to keep this for now. |
Currently,
StunError
has two variants:Parse
andIo
.I'd suggest to remove
StunError
in favor of usingio::Error::custom
with a string. That makes the public API smaller.The text was updated successfully, but these errors were encountered: