| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Including supporting machinery, new kind field, etc.
|
| | |
|
| |\
| |
| |
| |
| | |
Provide, and use From impl for InternalError
See merge request tpo/core/arti!315
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Adding this autoconversion is quite safe since every error generation
site is explicit and has its own context, and we don't really need to
add more.
This simplifies the code and will simplify future work.
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We should not generally explicitly specify a kind for errors which
contain a more detailed error which itself has a kind. Stating the
kind literally is a latent bug, which becomes a real bug if the
contained type's kind changes or starts to vary.
(There may be exceptions to this principle but this isn't one of
them.)
|
| |\ \
| | |
| | |
| | |
| | | |
Split up ErrorKind::ProtocolViolation
See merge request tpo/core/arti!312
|
| | |/ |
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the Error type to remove the yucky internal hidden Truncated
variant. Instead, there's now an embedded tor_bytes::Error value.
If that tor_bytes::Error is Truncated, we bubble it up when we convert our
handshake result to the nested error struct.
Thus there is still (sadly) a variant of tor_socksproto::Error
that shouldn't be exposed to user code. But refactoring every
inner method under handshake.rs seemed like a bad idea: once we're using
Result<Result<..>>, the ? operator no longer helps us much.
|
| | |
|
| |
|
|
|
| |
I'm not in love with this solution; the others just seem a bit ugly
too.
|
| |
|
|
|
| |
(This error isn't yet wrapped in TorError, but it will be eventually
when we implement socks proxy and PT support.)
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|