summaryrefslogtreecommitdiff
path: root/crates/tor-config/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-config: Deprecate ConfigError::Permissions, use FileAccessIan Jackson2024-07-101-0/+5
|
* tor-config: Correct message and description for mistrust errorIan Jackson2024-07-101-2/+4
| | | | Part of #1473
* Rename ConfigParseError => ConfigLoadErrorNick Mathewson2024-04-221-8/+15
| | | | | Figment can give an error under more conditions than just a parsing failure, so we should report it a bit more vaguely.
* Add an action field to Io error in tor-config.Nick Mathewson2024-04-221-6/+14
|
* Convert tor-config to use figment.Nick Mathewson2024-04-221-8/+24
| | | | | There are probably ways to make this a bit more elegant, but at least the tests still pass.
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-131-10/+7
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * Grammar fix.gabi-2502024-03-131-1/+1
| |
| * config: Remove From impls from config::ConfigErrorNick Mathewson2024-03-131-3/+6
| | | | | | | | These are another case of exposing the config crate.
| * tor-config: Put config::Config inside a wrapper type.Nick Mathewson2024-03-131-8/+2
| | | | | | | | This will let us replace Config with something better.
* | Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|/
* config: Fix output of NoCompileTimeSupport::withinNick Mathewson2024-01-161-1/+1
| | | | | Previously, within() would transform this error variant into Invalid.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* tor-config: Rename to ReconfigureError::UnsupportedSituationIan Jackson2022-11-241-1/+1
| | | | | | | | From Unsupported. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/889#note_2856873 This was added in this MR. Also add the missing semver note.
* tor-config: Rename to ConfigBuildError::NoCompileTimeSupportIan Jackson2022-11-241-2/+2
| | | | | | | | | From Unsupported. Following one of the suggestions here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/889#note_2856873 This was added in 2c3711614908d0c9cf1663b20b67a3fc233301f4 which was not yet in a release so this isn't a semver break. I have added the semver note that was omitted in that MR.
* tor-guardmgr: Refuse to configure bridges if we don't have the lockIan Jackson2022-11-231-0/+11
| | | | Fixes #612
* tor-config: introduce ConfigBuildError::UnsupportedIan Jackson2022-11-211-0/+14
| | | | And use it in bridge configuration parsing.
* tor-config: ConfigBuildError::within: Introduce add_prefixIan Jackson2022-11-211-3/+4
|
* Improve error from bad escapes in a toml config.Nick Mathewson2022-08-251-0/+36
| | | | | | | | | | | | | | | | | Whereas previously we would say: ``` target/debug/arti: error: invalid escape character in string: `Z` at line 9 column 14 in ../../.config/arti/arti.toml ``` we now say: ``` target/debug/arti: error: invalid escape character in string: `Z` at line 9 column 14 in ../../.config/arti/arti.toml (If you wanted to include a literal \ character, you need to escape it by writing two in a row: \\) ``` The implementation is a bit of a hack, I'm afraid, but I don't think it's all that bad. Closes #549.
* tor-config: Introduce ReconfigureError::BugIan Jackson2022-08-161-0/+4
| | | | Reconfigurations might fail due to internal errors.
* Add a few coverage-based tests to tor-config.Nick Mathewson2022-05-311-1/+20
| | | | There's nothing major here, but it does fill in a few gaps.
* impl From<SubfieldBuildError> for ConfigBuildErrorIan Jackson2022-04-221-0/+7
| | | | We are going to be using sub-field builders.
* tor-config: Add HasKind support.Nick Mathewson2022-02-091-0/+20
| | | | This required a few new ErrorKinds.
* address clippy's latest lintDaniel Eades2021-12-201-0/+1
|
* Sketch API for reconfiguration.Nick Mathewson2021-12-071-1/+13
| | | | | | | This patch doesn't actually make anything reconfigurable, but it does create an API that will tell you "you can't change the value of that!" If the API looks reasonable, I can start making it possible to change the values of individual items.
* Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-291-0/+4
|\
| * Resolve some warnings in tor-config testNick Mathewson2021-11-251-0/+4
| |
* | deglob some enums, use concise iteration syntaxDaniel Eades2021-11-251-0/+1
|/
* Fix a few typos.Nick Mathewson2021-11-241-1/+1
| | | | Also fix some commonwealth spellings that had slipped in.
* More tests for tor-config.Nick Mathewson2021-11-241-0/+54
|
* Use named fields for the elements of ConfigBuildErrorNick Mathewson2021-11-181-13/+33
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-0/+39
To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.