summaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* ChanMgr: Add more contextual info to error types.Nick Mathewson2022-07-061-16/+23
| | | | | | Now each type has a peer. In some cases this peer is just an address, whereas in others (where key is relevant or address isn't yet narrowed down) it's a full OwnedChanTarget.
* Do not include error source() in display() format.Nick Mathewson2022-06-211-2/+2
| | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* chanmgr: bubble ClockSkew up through the Error object.Nick Mathewson2022-04-071-5/+41
| | | | | | | | Fortunately, we don't need a separate type here: authenticated clock skew can only come attached to a `tor_proto::Error`. We also remove skew from `tor_proto::Error::HandshakeCertsExpired`, since it would now be redundant.
* chanmgr: implement HasRetryTime.Nick Mathewson2022-04-041-0/+31
|
* Implement a basic form of RFC 8305 ("happy eyeballs") for channelseta2022-03-071-0/+9
| | | | | | | | | | | | This makes Arti usable in IPv6-only environments (arti#92) by letting us attempt multiple connections to a given relay using all of its addresses instead of just using the first (probably IPv4) one, using the strategy from RFC 8305 ยง 5. This isn't a complete implementation of Happy Eyeballs; ideally, we'd sort the address list before doing concurrent connections. However, it works (and has been tested inside an IPv6-only container inside eta's network :p)
* tor-proto: Split IoErr based on when it occursNick Mathewson2022-02-231-1/+1
| | | | | | | We want to distinguish handshake failures from errors later on in the channel's lifetime. Closes #359.
* Rename TorConnectionFailed to TorAccessFailedNick Mathewson2022-02-221-2/+2
|
* tor-chanmgr: use Bug types.Nick Mathewson2022-02-161-4/+4
|
* Implement HasKind for tor-chanmgr::ErrorNick Mathewson2022-02-161-2/+6
| | | | (There will be a folowup to work on internal errors here.)
* Make SpawnError wrappers contain a 'spawning' stringNick Mathewson2022-02-041-9/+18
| | | | | (By our convention, these errors should say what we were trying to spawn when the error occurred.)
* channel errors: Include what we were doingIan Jackson2022-02-041-5/+3
|
* errors: Add some TODOs as per discussion commentsIan Jackson2022-02-041-0/+5
|
* tor-chanmgr::Error: impl HasKindIan Jackson2022-02-041-0/+13
|
* tor-chanmgr: Handle IO errora in the new styleIan Jackson2022-02-041-9/+11
| | | | | Two ? in the tests become expects, which will do. That avoids having to construct a proper error with context here.
* spawn errors: Fix arti-client, tor-chanmgr, tor-circmgrIan Jackson2022-02-041-3/+9
| | | | | | | Provide an enum variant to contain the SpawnError and a From impl. We use `#[from]` here because it doesn't really make sense to attach any context, as it's not likely to be very relevant.
* tor-chanmgr: remove PendingChanError as unnecessary.Nick Mathewson2021-10-281-19/+0
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+76
This will cause some pain for now, but now is really the best time to do this kind of thing.