aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-error
Commit message (Collapse)AuthorAgeFilesLines
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-233-0/+3
|
* tor-error, arti: Bump backtrace to 0.3.68.Gabriela Moldovan2023-08-151-1/+1
| | | | | | | | Previously we were using backtrace 0.3.39, which has a [bug] that causes it to segault in some circumstances. I experienced this bug while trying to fix the minimal-versions build in !1508. [bug]: https://github.com/rust-lang/backtrace-rs/issues/267
* tor-error: Remove KeystoreFsPermissions variant.Gabriela Moldovan2023-08-081-12/+0
| | | | | | | | According to the `ErrorKind` lumping guidelines, `KeystoreFsPermissions` should be lumped with `FsPermissions`: they represent the same type of error, and their "location" is the same ("Host"). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1315#note_2916455
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Merge branch 'bump_versions_117' into 'main'arti-v1.1.7Nick Mathewson2023-08-011-2/+2
|\ | | | | | | | | Vesion bumps for 1.1.7. See merge request tpo/core/arti!1458
| * Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
| * Update minor versions on crates that have had breaking changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had first-order breaking changes: ``` retry-error tor-keymgr tor-proto tor-hsclient tor-rtmock ``` Additionally, these broke because they re-exposed RetryError: ``` tor-circmgr ``` Additionally, these broke because they may re-expose something from tor-proto: ``` arti-client tor-chanmgr tor-dirclient tor-dirmgr tor-guardmgr ``` Additionally, these broke for other fiddly reasons: `tor-ptmgr` implements traits from tor-chanmgr, which has a breaking change above. `arti-hyper` exposes types from arti-client in its API.
* | Run "fixup features" in preparation for a release.Nick Mathewson2023-08-011-1/+1
|/
* retry-error: Provide fmt_error_with_sources in retry-errorIan Jackson2023-07-192-16/+4
| | | | | This code came from tor-error. So now tor-error depends on retry-error.
* clippy: tor-error: Use convert::identity for into_internal!Ian Jackson2023-07-101-0/+4
| | | | | | | | | | This launders the closure so that clippy's clippy::redundant_closure_call can't see it. We can't have a local #[allow] because it would be on an expression, which isn't allowed on stable. This avoids having to use more clumsy idioms at call sites.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-104-0/+4
|
* Fix warn_report and error_report macros.Nick Mathewson2023-07-071-4/+10
| | | | | | | | | Originally they didn't check err.kind(), since err.kind() can never increase their severity. We lost that behavior with !1386, and we became dependent on it with arti!1383. Since they both merged at the same time, CI broke. This patch restores their original behavior.
* tor-error: tracing module: Use macro to generate macrosIan Jackson2023-07-072-91/+54
| | | | | | | | | | This abolishes some quintuplication. The output is identical except that: * The syntax display in the rustdoc output for the resulting macros seems to have somewhat less whitepsace. * The whimsical error messages in the examples are all identical. Ah well.
* tor-error: tracing module: Fix link to tracing macroIan Jackson2023-07-071-1/+1
|
* Merge branch 'report-bugs-v2' into 'main'Nick Mathewson2023-07-073-1/+199
|\ | | | | | | | | Optional tracing support in tor-error for error reporting See merge request tpo/core/arti!1379
| * event_report: assert correctness of format endingNick Mathewson2023-07-072-0/+23
| | | | | | | | | | (Also, document that this static assertion is the reason why you are seeing a confusing error message.)
| * tor-error: Add optional tracing supportNick Mathewson2023-07-073-1/+176
| | | | | | | | | | | | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* | Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
|/ | | | Closes #950.
* Add TODO comments about possibly migrating away from the backtrace crate.Nick Mathewson2023-07-051-0/+2
|
* Remove semver.md files for 1.1.6Nick Mathewson2023-06-301-3/+0
|
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* tor-error: Make KeystoreFsPermissions experimental for nowIan Jackson2023-06-291-0/+3
| | | | Let's defer this decision.
* tor-error: Add KeystoreAccessFailed, KeystoreFsPermissions to ErrorKind.Gabriela Moldovan2023-06-282-1/+21
|
* tor-error: Add KeystoreCorrupted to ErrorKind.Gabriela Moldovan2023-06-282-0/+11
|
* tor-error: Mark define_asref_dyn_std_error as non-experimentalNick Mathewson2023-06-231-1/+0
| | | | | (I see no problems with this macro. In the worst case, we deprecate it someday.)
* tor-error: Stabilize OnionService error kindsNick Mathewson2023-06-221-7/+0
|
* tor-error: typo fix in a comment.Nick Mathewson2023-06-221-1/+1
|
* Remove onion service descriptor-related errorkinds.Nick Mathewson2023-06-221-46/+0
| | | | | | | | These have been subsumed by other errorkinds, mostly OnionServiceProtocolViolation and TorProtocolViolation. In particular please review the change in tor-hsclient closely; I am not sure about the new errorkinds for the error there.
* Merge branch 'socks_errorkinds' into 'main'Nick Mathewson2023-06-221-16/+6
|\ | | | | | | | | | | | | Generate correct-ish socks5 errors for onion service errors. Closes #736 See merge request tpo/core/arti!1279
| * New ErrorKind for invalid onion addressesNick Mathewson2023-06-221-0/+9
| | | | | | | | Use this to emit HS_BAD_ADDRESS as appropriate.
| * Remove ErrorKind::OnionService{Intro,Rend}FailedNick Mathewson2023-06-221-19/+0
| | | | | | | | | | These errors are orthogonal to our actual error kinds. See discussion on #736.
* | Merge branch 'stderr' into 'main'Alexander Færøy2023-06-211-0/+2
|\ \ | | | | | | | | | | | | lints: Promote clippy::print_stderr and clippy::print_stdout See merge request tpo/core/arti!1271
| * | lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
| | |
* | | Merge branch 'upgrade_21June2023' into 'main'gabi-2502023-06-211-1/+1
|\ \ \ | |_|/ |/| | | | | | | | Upgrade a couple of dependencies See merge request tpo/core/arti!1276
| * | Upgrade to strum 0.25.Nick Mathewson2023-06-211-1/+1
| |/
* / Add and use ErrorKinds for remaining onion service errorsNick Mathewson2023-06-211-0/+36
|/
* tor-error: Introduce `LooseCmpRetryTime`Ian Jackson2023-06-152-0/+20
| | | | | Having a newtype for this kind of thing is considerably more convenient. I'm going to use this in a moment.
* tor-hsclient: Conduct the INTRODUCE1 exchangeIan Jackson2023-06-131-0/+10
|
* tor-error: Clarify what we mean by "hostile".Gabriela Moldovan2023-06-121-1/+1
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-error: Document another potential cause for ↵Gabriela Moldovan2023-06-121-0/+4
| | | | | | OnionServiceDescriptorValidationFailed. Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-error: Extend applicability of RemoteNetworkTimeoutIan Jackson2023-06-091-1/+6
| | | | | We're going to use this for rendezvous completion timeout, which could be due to basically anything.
* tor-hsclient: impl HasKind for InvalidTarget: ..DescriptorValidationFailedIan Jackson2023-06-091-2/+4
| | | | | | This basically always means we couldn't cope with the descriptor. We need to extend the description of OnionServiceDescriptorValidationFailed
* tor-error: Introduce define_asref_dyn_std_error and use itIan Jackson2023-06-091-0/+17
| | | | | This factors out an ad-hoc AsRef impl. We're going to want to reuse this for another error type.
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Revise all XXXXs from fixup-featuresNick Mathewson2023-05-151-5/+6
|
* Run fixup-features _with_ annotations.Nick Mathewson2023-05-151-0/+4
| | | | | This litters our Cargo.toml files with "XXX" entries that we should fix.
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-0/+1
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* tor-error: Add a TODO regarding HS desc parsing errors.Gabriela Moldovan2023-05-031-0/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* Clarify what the new ErrorKinds mean.Gabriela Moldovan2023-05-031-4/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>