summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-netdir: remove unused error variantsNick Mathewson2022-02-151-19/+0
| |/ / | | | | | | | | | | | | This turns out to have been most of them, which simplifies matters a lot.
* | | Merge branch 'cell-proto-error' into 'main'Nick Mathewson2022-02-1621-107/+291
|\ \ \ | |_|/ |/| | | | | | | | tor-cell and tor-proto: provide HasKind. See merge request tpo/core/arti!304
| * | tor_proto::Error: Fix an incomplete sentence.Nick Mathewson2022-02-161-1/+2
| | |
| * | Update tor-proto errors to latest API.Nick Mathewson2022-02-1511-43/+41
| | |
| * | Update tor-cell errors to latest APINick Mathewson2022-02-151-4/+4
| | |
| * | Make tor-proto::Error implement HasKind.Nick Mathewson2022-02-154-27/+121
| | | | | | | | | | | | | | | | | | 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-proto: use InternalError for internal errors.Nick Mathewson2022-02-1514-45/+85
| | |
| * | tor-cell: provide HasKind.Nick Mathewson2022-02-1510-31/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'ticket_344' into 'main'eta2022-02-161-5/+24
|\ \ \ | | | | | | | | | | | | | | | | Refactor tor-netdoc a bit more, to use Bug right. See merge request tpo/core/arti!316
| * | | Fix a rustdoc error.Nick Mathewson2022-02-151-1/+1
| | | |
| * | | Refactor tor-netdoc a bit more, to use Bug right.Nick Mathewson2022-02-151-4/+23
| | |/ | |/|
* | | Merge branch 'issue-320' into 'main'Nick Mathewson2022-02-162-15/+13
|\ \ \ | |/ / |/| | | | | | | | Move persistent state flush from client to circmgr See merge request tpo/core/arti!321
| * | Move persistent state flush from client to circmgrYuan Lyu2022-02-152-15/+13
|/ /
* | Minimal compilation fix: InternalError=>BugNick Mathewson2022-02-151-2/+2
| | | | | | | | This is a followup for !314 and !310 to fix compilation on main.
* | Merge branch 'doc-errors' into 'main'Nick Mathewson2022-02-1522-399/+581
|\ \ | |/ |/| | | | | Refactor errors in tor-netdoc See merge request tpo/core/arti!314
| * Typo fix from@etaeta2022-02-151-1/+1
| |
| * Refactor tor_netdoc::ErrorNick Mathewson2022-02-1417-378/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error type doesn't impement HasKind, since the kind will depend on context. However, the existing implementation was pretty messy and inconsistent: Some errors had positions, some didn't. Some took messages as str, some as String. Some had internal errors that were somewhat orthogonal to their actual types. This commit refactors tor_netdoc::Error to use a ParseErrorKind, and adds a set of convenience functions to add positions and messages to the errors that need them.
| * netdoc: Make doc-build errors a separate typeNick Mathewson2022-02-147-13/+30
| | | | | | | | | | Every other case of tor_netdoc::Error means a parse failure. This one, though, means a failure to construct a document.
| * netdoc: remove Error::Untimely.Nick Mathewson2022-02-141-11/+0
| | | | | | | | Nothing creates this.
* | Merge branch 'error-kind-badargument' into 'main'Ian Jackson2022-02-155-53/+112
|\ \ | | | | | | | | | | | | New name and semantics for Bug (was BadArgument) See merge request tpo/core/arti!310
| * | 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.
| * | tor-socksproto: Use bad_api_usage! rather than ad-hoc Invalid errorIan Jackson2022-02-152-8/+3
| | |
| * | Make Bug from InternalError, add bad_api_usage! and into_bad_api_usage!Ian Jackson2022-02-154-42/+97
| | | | | | | | | | | | Including supporting machinery, new kind field, etc.
| * | New name and semantics for BadAPIUsage (was BadArgument)Ian Jackson2022-02-152-4/+13
|/ /
* | Merge branch 'error-socksproto-autoconvert' into 'main'Nick Mathewson2022-02-142-14/+7
|\ \ | | | | | | | | | | | | Provide, and use From impl for InternalError See merge request tpo/core/arti!315
| * | Run rustfmt.Nick Mathewson2022-02-141-12/+5
| | |
| * | Provide, and use From impl for InternalErrorIan Jackson2022-02-142-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'explain_into_tor_addr' into 'main'Nick Mathewson2022-02-141-4/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | More docs for IntoTorAddr Closes #253 See merge request tpo/core/arti!305
| * | | More docs for IntoTorAddrNick Mathewson2022-02-141-4/+25
| |/ /
* | | Merge branch 'ticket_337' into 'main'eta2022-02-143-39/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Simplify wait_for_bootstrap to use a Mutex. Closes #337 See merge request tpo/core/arti!308
| * | | Simplify wait_for_bootstrap to use a Mutex.Nick Mathewson2022-02-143-39/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | Since the only purpose of this function is to make sure that no bootstrapping task is running, a simple futures::lock::Mutex should do the job just fine. Closes #337.
* | | Merge branch 'warn_not_deny' into 'main'eta2022-02-1431-31/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-1431-31/+31
| |/ / | | | | | | | | | Closes #338.
* | | Merge remote-tracking branch 'origin/mr/313'Nick Mathewson2022-02-141-2/+2
|\ \ \
| * | | tor_socksproto::Error HasKind fix two delegationsIan Jackson2022-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* | | | Merge branch 'error-kind-protocol' into 'main'Ian Jackson2022-02-142-6/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Split up ErrorKind::ProtocolViolation See merge request tpo/core/arti!312
| * | | | Split up ErrorKind::ProtocolViolationIan Jackson2022-02-142-6/+19
| |/ / /
* | | | Merge branch 'error-kind-notimp' into 'main'Ian Jackson2022-02-144-15/+32
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | Split up ErrorKind::NoSupport See merge request tpo/core/arti!311
| * | | ErrorKind::NotImplemented: fix two testsIan Jackson2022-02-142-2/+2
| | | |
| * | | Split up ErrorKind::NoSupportIan Jackson2022-02-144-13/+30
| |/ /
* | | Merge branch 'error-kind-config-transition' into 'main'Nick Mathewson2022-02-141-0/+3
|\ \ \ | | | | | | | | | | | | | | | | Clarify ErrorKind::InvalidConfigTransition See merge request tpo/core/arti!309
| * | | Clarify ErrorKind::InvalidConfigTransitionIan Jackson2022-02-141-0/+3
| |/ /
* | | Merge branch 'useless_qm' into 'main'Nick Mathewson2022-02-141-1/+1
|\ \ \ | |/ / |/| | | | | | | | dirmgr: Remove a useless Ok(x?) See merge request tpo/core/arti!307
| * | dirmgr: Remove a useless Ok(x?)Nick Mathewson2022-02-141-1/+1
| |/ | | | | | | Found by nightly clippy.
* | Merge branch 'update_if_zero' into 'main'Nick Mathewson2022-02-142-4/+38
|\ \ | |/ |/| | | | | Use atomic set-and-check to update OptTimestamps if none. See merge request tpo/core/arti!297
| * Use atomic set-and-check to update OptTimestamps if none.Nick Mathewson2022-02-092-4/+38
| | | | | | | | | | | | | | This fixes a tiny race condition in the previous code, where we checked whether an OptTimestamp is None a bit before we set it. Since std::atomic gives us compare_exchange, we might as well use it.
* | Rename bootstrap_existing to bootstrap.Nick Mathewson2022-02-112-12/+10
| | | | | | | | (Looks like this one got missed.)
* | Merge branch 'eta/unbootstrapped-clients' into 'main'Nick Mathewson2022-02-1112-93/+386
|\ \ | | | | | | | | | | | | | | | | | | Allow creating unbootstrapped `TorClient`s (and `DirMgr`s) Closes #293 See merge request tpo/core/arti!298