aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-error/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * Tweak documentation on ErrorKind::TransientNick Mathewson2022-02-171-5/+4
| |
| * tor-error: splitting/lumping guidelinesIan Jackson2022-02-171-0/+32
| |
| * ErrorKind::RemoteRefused: Expand on description, narrowing scopeIan Jackson2022-02-171-0/+3
| |
| * ErrorKind::Csnceled: Expand on descriptionIan Jackson2022-02-171-0/+3
| |
| * ErrorKind::CircuitTimeout: Expand on descriptionIan Jackson2022-02-171-1/+2
| |
| * ErrorKind::DirectoryExpired: Add possible deprecation notesIan Jackson2022-02-171-0/+6
| |
| * tor_error: a couple of spelling/formatting issuesNick Mathewson2022-02-161-4/+4
| |
| * Finally remove ErrorKind::TODO.Nick Mathewson2022-02-161-8/+0
| | | | | | | | Closes #322.
| * arti_client: provide Kinds for all errors.Nick Mathewson2022-02-161-0/+16
| |
| * dirmgr: implement HasKind for the easier variantsNick Mathewson2022-02-161-1/+31
| |
| * circmgr: Add a Kind for speculative guard failure.Nick Mathewson2022-02-161-0/+12
| | | | | | | | | | | | | | | | | | | | These errors should almost never be seen by the user; we should instead retry the circuit. But they _can_ be seen by the use if selecting a guard takes too long, or too many attempts. (Therefore, they aren't true "internal" errors.) I suspect that we might not want to keep this TransientFailure kind, but I'm not sure what else to do here for now.
| * Add kinds for *most* circmgr errors.Nick Mathewson2022-02-161-0/+47
| | | | | | | | There are a couple of tricky ones I'll do separately.
* | Fix typosDimitris Apostolou2022-02-171-3/+3
|/
* Make tor-proto::Error implement HasKind.Nick Mathewson2022-02-151-1/+67
| | | | | | This took some refactoring, and gave an opportunity to notice a few error variants that weren't being used, or didn't mean what they said on the tin.
* tor-cell: provide HasKind.Nick Mathewson2022-02-151-1/+9
| | | | | | | | | Additionally, refactor the IoError out of tor_cell::Error: nothing in TorCell created this; it was only used by tor_proto. This required refactoring in tor_proto to use a new error type. Here I decided to use a new CodecError for now, though we may refactor that away soon too.
* tor_error::Bug: change Display impl to use kindIan Jackson2022-02-151-2/+2
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777626 The message from the kind is precisely right.
* BadApiUsage: change Display impl capitalisationIan Jackson2022-02-151-1/+1
| | | | Now it maches the others
* Rename BadApiUsage from BadAPIUsageIan Jackson2022-02-152-5/+5
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777519 mutatis mutandi. And, fix a leftover instance with an old idea of what this was called.
* Make Bug from InternalError, add bad_api_usage! and into_bad_api_usage!Ian Jackson2022-02-152-34/+89
| | | | Including supporting machinery, new kind field, etc.
* New name and semantics for BadAPIUsage (was BadArgument)Ian Jackson2022-02-151-3/+10
|
* Merge branch 'warn_not_deny' into 'main'eta2022-02-141-1/+1
|\ | | | | | | | | | | | | Change deny(clippy::all) to warn(clippy::all). Closes #338 See merge request tpo/core/arti!306
| * Change deny(clippy::all) to warn(clippy::all).Nick Mathewson2022-02-141-1/+1
| | | | | | | | Closes #338.
* | Merge branch 'error-kind-protocol' into 'main'Ian Jackson2022-02-141-5/+18
|\ \ | | | | | | | | | | | | Split up ErrorKind::ProtocolViolation See merge request tpo/core/arti!312
| * | Split up ErrorKind::ProtocolViolationIan Jackson2022-02-141-5/+18
| |/
* | Merge branch 'error-kind-notimp' into 'main'Ian Jackson2022-02-141-7/+24
|\ \ | | | | | | | | | | | | Split up ErrorKind::NoSupport See merge request tpo/core/arti!311
| * | Split up ErrorKind::NoSupportIan Jackson2022-02-141-7/+24
| |/
* / Clarify ErrorKind::InvalidConfigTransitionIan Jackson2022-02-141-0/+3
|/
* Merge branch 'eta/unbootstrapped-clients' into 'main'Nick Mathewson2022-02-111-0/+4
|\ | | | | | | | | | | | | Allow creating unbootstrapped `TorClient`s (and `DirMgr`s) Closes #293 See merge request tpo/core/arti!298
| * Allow creating unbootstrapped `TorClient`s (and `DirMgr`s)eta2022-02-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes how the `TorClient` type works, enabling it to be constructed synchronously without initiating the bootstrapping process. Daemon tasks are still started on construction (although some of them won't do anything if the client isn't bootstrapped). The old bootstrap() methods are now reimplemented in terms of the new create_unbootstrapped() and bootstrap_existing() methods. This required refactoring how the `DirMgr` works to enable the same sort of thing there. closes #293
* | socksproto: Simplify Truncated handlingNick Mathewson2022-02-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Move the Truncated error into tor-errors.Nick Mathewson2022-02-112-0/+25
| |
* | tor-socksproto: Implement HasKindNick Mathewson2022-02-111-0/+25
| | | | | | | | | | (This error isn't yet wrapped in TorError, but it will be eventually when we implement socks proxy and PT support.)
* | tor-config: Add HasKind support.Nick Mathewson2022-02-091-0/+35
|/ | | | This required a few new ErrorKinds.
* tests for tor-error::internalNick Mathewson2022-02-041-1/+47
| | | | | | These tests turned up a need for using the #[track_caller] annotation in order to get accurate locations, which is fortunately stable since Rust 1.46.0.
* Docs and clarification for a bunch of Error stuffNick Mathewson2022-02-041-9/+32
|
* Make the Error detail type non-exported from arti-clientNick Mathewson2022-02-041-0/+4
| | | | | | | | | | | At least by default, we should have Error be private, and not expose it as part of our APIs. To keep functionality in `arti`, I had to add an `ExitTimeout` error kind. For interface consistency, I also re-exported ErrorKind and HasError from `arti_client`.
* errors: ErrorKind::TODO: Fix typo in messageIan Jackson2022-02-041-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/262#note_2772816
* errors: Change docs for ErrorKind to refer to ArtiIan Jackson2022-02-041-2/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/262#note_2772810
* errors: Drop "Error" and "Failed" from various enum variantsIan Jackson2022-02-042-2/+2
|
* tor-chanmgr::Error: impl HasKindIan Jackson2022-02-041-0/+8
|
* errors: Initial impl HasKind in arti-client, ErrorKind::TODOIan Jackson2022-02-041-0/+6
| | | | | | | | | This involves making a temporary ErrorKind::TODO. That will continue to exist until all errors (at least, the ones that make it out to here) can be properly categorised. Introducing this will let us work from the top and bottom towards the middle.
* spawn errors: impl HasKind for futures::SpawnErrorIan Jackson2022-02-041-0/+19
| | | | | | | | | This needs two kinds. We have decided to treat a non-shutdown SpawnError as "unexplained" rather than as an InternalError. There are many crates whose From<futures::task::SpawnError> for Error erroneously treat it as an internal error. We will fix them in a moment.
* tor_persist::Error: impl HasKind and adjust commentsIan Jackson2022-02-041-0/+25
| | | | | And change the comments to slightly reinterpret these errors, to relate to the circumstances rather than error generation site.
* tor-error: provide into_internal!Ian Jackson2022-02-041-0/+33
|
* tor-error: Allow making an `InternalError` from some other errorIan Jackson2022-02-041-3/+27
| | | | | | | This can be used in call sites where an error is thought not to be possible. The `source` will be used only for formatting messages.
* tor-error: Introduce InternalError as a type and a kindIan Jackson2022-02-042-0/+142
| | | | This can contain a backtrace, which will be printed.
* tor-error: Skeleton for new crateIan Jackson2022-02-041-0/+58
As per doc/Errors.md. Currently there are no error kinds. Some will be added as we go along.