summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2025-03-03 21:03:24 +1300
committerBen Bridle <ben@derelict.engineering>2025-03-03 21:03:24 +1300
commitb2374eb1746f54f58ecf1a3ac5d375b3d0f15da0 (patch)
tree9a1317044d582c94796d748ae6f517ff388137c4 /src/lib.rs
parent8a43a02b6950455aedbbdbee737bee1654aa91ef (diff)
downloadswitchboard-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.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d968cf2..0a2954d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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