| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```text
2024-10-29T01:57:31Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
Backtrace [{ fn: "tor_error::internal::ie_backtrace::capture", file: "./crates/tor-error/src/internal.rs", line: 21 }, { fn: "tor_error::internal::Bug::new_inner", file: "./crates/tor-error/src/internal.rs", line: 105 }, { fn: "tor_error::internal::Bug::new", file: "./crates/tor-error/src/internal.rs", line: 94 }, { fn: "arti::main_main", file: "./crates/arti/src/lib.rs", line: 378 }, ...
```
After:
```text
2024-10-29T01:58:23Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
0: tor_error::internal::ie_backtrace::capture
at ./crates/tor-error/src/internal.rs:21:27
1: tor_error::internal::Bug::new_inner
at ./crates/tor-error/src/internal.rs:105:24
2: tor_error::internal::Bug::new
at ./crates/tor-error/src/internal.rs:94:9
3: arti::main_main
at ./crates/arti/src/lib.rs:378:27
...
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These are not regular ErrorKinds, since they can never occur in an
error that's meant to be returned from a Rust API like
`arti-client`. Instead, they only exist for errors returned from
RpcError.
(I can't find the place where we discussed this previously, but the
rationale is that if an ErrorKind never makes sense in response to
something that the user does from Rust, we should never have that be
an ErrorKind. The fact that the removed kinds do not actually
appear outside the RPC system suggests that this is reasonable.)
|
| |
|
|
|
|
| |
This is part of an effort to make arti-rpc-client-core (and future
similar tools) able to use our very-low-level crates
without depending on things they don't need.
|
| |\
| |
| |
| |
| | |
Add some more miri tests
See merge request tpo/core/arti!2502
|
| | | |
|
| |/
|
|
|
|
| |
These, like the other RPC-only error kinds, probably don't belong in
`tor-error`. But for now, that's where they all are, and moving
them is out of scope for this branch. See #1668.
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |\
| |
| |
| |
| | |
RPC: Method to expose a list of RPC methods.
See merge request tpo/core/arti!2332
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`void::Void` represents the type of an object that can't be
constructed. It's especially useful as the error type of an
infallible function. `void::Void` already implements
`std::error::Error`, so all we need to do to use it as a "can't
happen" error type in our code is to have it also implement
`HasKind`.
Also implement HasKind for Infallible while we're at it.
|
| |/
|
|
|
| |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| | |
|
| |
|
|
|
| |
We've wanted separate error codes for "no such method exists" and
"this method exists, but this object doesn't have it."
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| | |
|
| |
|
|
| |
Found by "git grep adhoc" and manual inspection.
|
| | |
|
| | |
|
| |
|
|
|
| |
Prompted by clippy complaining that the content wasn't ever read other
than by the autogenerated Debug impl.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This will let us impl for dyn StdError.
|
| |
|
|
|
| |
This impl can only compile for Self: Sized. This will let us remove
the Sized bound from the trait itself.
|
| |
|
|
|
|
| |
We're going to need to make change to this trait which would be
breaking for out-of-crate implementors. This should have been sealed
all along.
|
| |
|
|
|
|
|
|
| |
Our HSS code isn't going to work if you run more than one copy. Soon
we'll detect this (via our use of tor_persist).
There may be other places this ought to be used. Eg if we get
EADDRINUSE from trying to set up a proxy, maybe ...
|
| |
|
|
|
|
|
|
|
| |
Tbis will result in "some message ...: the error" which I think is OK.
We don't use a Unicode single-character ellipsis because that
character can be hard to read at font sizes which are otherwise OK for
text, and because use of non-ascii in logfiles and error messages is
unecessary and might cause unnecessary trouble (for example, if the
log messages end up going somewhere which isn't 100% valid UTF-8).
|
| |
|
|
|
| |
Possibly at some point in the past, matching a slice directly wasn't
possible. But it is now.
|
| | |
|
| |
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
| |
This code came from tor-error. So now tor-error depends on
retry-error.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |\
| |
| |
| |
| | |
Optional tracing support in tor-error for error reporting
See merge request tpo/core/arti!1379
|
| | |
| |
| |
| |
| | |
(Also, document that this static assertion is the reason why you are
seeing a confusing error message.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
| |
Closes #950.
|
| | |
|
| |
|
|
| |
Let's defer this decision.
|
| | |
|
| | |
|
| |
|
|
|
| |
(I see no problems with this macro. In the worst case, we deprecate
it someday.)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| |
| |
| | |
Generate correct-ish socks5 errors for onion service errors.
Closes #736
See merge request tpo/core/arti!1279
|