diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-03-03 21:03:24 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-03-03 21:03:24 +1300 |
commit | b2374eb1746f54f58ecf1a3ac5d375b3d0f15da0 (patch) | |
tree | 9a1317044d582c94796d748ae6f517ff388137c4 /src/lib.rs | |
parent | 8a43a02b6950455aedbbdbee737bee1654aa91ef (diff) | |
download | switchboard-b2374eb1746f54f58ecf1a3ac5d375b3d0f15da0.zip |
Report malformed switches as errors
Previously, malformed arguments were silently ignored when encountered.
This could cause unexpected behaviour if the malformed argument is
safety critical, so now an error is reported.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -23,7 +23,8 @@ impl std::fmt::Display for SwitchName { } } -pub enum QueryError { +pub enum SwitchboardError { + Malformed(String), MissingNamed(String), MissingPositional(String), // String is the debug name of the switch |