aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse2/error.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Add a TODO re VerifyFailedIan Jackson2026-04-271-1/+1
|
* tor-netdoc: impl conversions from tor-checkable errors to VerifyFailedIan Jackson2026-04-231-0/+17
|
* parse2: Implement `ParseError::new()`Clara Engler2026-03-251-0/+19
| | | | | | | | | This commit adds the ParseError::new() method, which allows external APIs to construct a ParseError, which is currently not possible due to non-exhaustiveness, despite the member fields being public. It is required for external applications using lower-level but public parse2 APIs, such as ItemStream's.
* Fix typosTobias Stoeckmann2026-03-241-1/+1
| | | | Typos found with codespell
* tor-netdoc: Add VerifyFailed::BugIan Jackson2026-03-191-0/+3
| | | | | We're going to want this for cases where the hash computation machinery didn't DTRT.
* Merge branch 'encoded-authcert' into 'main'Ian Jackson2026-01-151-0/+3
|\ | | | | | | | | Implement EncodedAuthCert and use it in poc for votes See merge request tpo/core/arti!3592
| * tor-netdoc: Add an error variant we'll need for parsing embedded docsIan Jackson2026-01-151-0/+3
| |
* | tor-netdoc: Change error variantsClara Engler2026-01-151-1/+7
|/ | | | | | | This commit changes `ErrorProblem::Other` to `ErrorProblem::OtherBadDocument` while adding two new variants: * `ErrorProblem::Internal` * `ErrorProblem::BadApiUsage`
* tor-netdoc: Implement (Partial)Eq for VerifyFailedClara Engler2025-12-041-1/+1
|
* tor-netdoc: parse2: Work around MSRV unhelpful lifetimeIan Jackson2025-10-091-2/+6
| | | | | | | | | | 1.85.1 rejects this, because it doesn't extend the lifetime of the `format_args!`. 1.90 is fine with it. I want to keep `format!` not `String::new()` so that it's easy to change back. That means a clippy allow. Getting that to apply to the code inside the derive is tricky, so I've enabled it for the whole module. (IMO this clippy lint is pretty annoying anyway.)
* tor-netdoc: parse2: Add column field to PaarsError and print itIan Jackson2025-10-091-2/+12
|
* tor-netdoc: parse2: Add .column() accessor to ErrorProblemIan Jackson2025-10-091-1/+28
| | | | We'll want to general way to find the error problem column.
* tor-netdoc: parse2: Add column field as far as ErrorProblemIan Jackson2025-10-091-4/+17
| | | | | | | Provide facilities in ArgumnetStream for determining the column, and add the field to all the error types up to and including ErrorProblem. The value still needs to be propagated to ParseError, and printed there.
* tor-netdoc: Introduce ArgumentErrorIan Jackson2025-10-091-1/+29
| | | | | This will allow us to (1) move field name handling out of the argument parser method, and also (2) add columns more easily.
* tor-netdoc: Have .reject_extra_args return a bespoke errorIan Jackson2025-10-091-0/+15
| | | | | | | We're about to have some functions return ArgumentError and some ErrorProblem. We don't want to provide a conversion directly between these types, so instead introduce a new type that will be convertible to either.
* netdoc parse2: Don't duplicate the error sourceIan Jackson2025-09-291-1/+1
| | | | `problem` is the `#[source]`.
* netdoc parse2: Fix invalid keyword error problem reportIan Jackson2025-09-291-1/+1
| | | | `#[from]` is not `#[source]`. We need to print the inner error.
* tor-netdoc: Introduce parse2, new parserIan Jackson2025-08-141-0/+166
This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment.