| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix typos
See merge request tpo/core/arti!301
|
| | | | | |
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
This crate's Error type is too low-level to have an ErrorKind, but
it does make sense to use InternalError for the internal errors
here.
|
| | |/
|/|
| |
| | |
This required a few new ErrorKinds.
|
| | |
| |
| |
| |
| |
| | |
This edge-case was there even before the migration of
595fe1ab881b94106649, but now it's more explicit and ought to be
revisited.
|
| |/ |
|
| |
|
|
| |
This fixes a compilation error.
|
| |
|
|
|
|
|
|
| |
Instead of declaring a macro that takes vis as an argument, we now
conditionally declare a macro that applies an appropriate visibility.
There's a long comment explaining the rationale here, along with a
couple of other solutions that don't work.
|
| |
|
|
|
|
|
| |
This is closer to common usage.
(Not that we all agree with common usage, but it's closer to what
people expect.)
|
| |
|
|
|
|
|
| |
This is closer to what we described in Errors.md.
Also, remove the (sometimes private) Result alias: it was only used in
one or two places, and never exposed in public.
|
| |
|
|
|
|
| |
This change lets us make TorError's members unconditionally hidden,
and makes our API a little more consistent (since basically nothing
else is a public field).
|
| |\
| |
| |
| |
| | |
Hopefully uncontroversial improvements to new Error code
See merge request tpo/core/arti!291
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| |
| | |
(By our convention, these errors should say what we were trying to
spawn when the error occurred.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
| | |
| |
| |
| |
| | |
I had planned to use assert_impl, but that can't check for
the 'static lifetime.
|
| | |
| |
| |
| |
| | |
This patch makes only minimal changes in lower-level error types:
we have more refactoring to do.
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| |
| |
| | |
New error handling proof of concept
See merge request tpo/core/arti!262
|
| | |
| |
| |
| |
| |
| | |
This is the first version that builds correctly on our CI. It's
from back in 2018, so requiring it shouldn't cause any major
problems.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/262#note_2772816
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/262#note_2772810
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This will get quite large and boxing it here is very convenient.
This also avoids us exposing a large error type to our callers.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The motivation for doing this now is to remove the `#[from]` so we
would spot where operationsl circuit setup failures were handled.
(But it turns out that they are turned into internal errors!)
Perhaps this will want to become a different error type from circmgr
in due course, but for now we simply use a bespoke variant of
TorError.
It will want its own Kind. The TODO in the HasKind impl marks
this (amongst much else here).
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Two ? in the tests become expects, which will do. That avoids having
to construct a proper error with context here.
|
| | |
| |
| |
| |
| | |
Right now we must always expose the `Error` type since we haven't
converted everything.
|
| | |
| |
| |
| | |
We are going to make the top-level Error type conditionally hidden.
|
| | |
| |
| |
| | |
Still much to do here.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
This makes this like all the others, and is marginally shorter
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
And change the comments to slightly reinterpret these errors, to
relate to the circumstances rather than error generation site.
|
| | |
| |
| |
| | |
Doing this here makes it easier when I rebase/reorder things
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|