summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorfx <[email protected]>2023-10-18 15:11:44 +0200
committerfx <[email protected]>2023-10-18 15:11:44 +0200
commitb4f59c226c6916a3e45f1a52dc6a9b15c800297a (patch)
tree07016e2ac7278da6b63aa839065c5ad572215e50 /src/error.rs
downloadwebol-cli-b4f59c226c6916a3e45f1a52dc6a9b15c800297a.tar
webol-cli-b4f59c226c6916a3e45f1a52dc6a9b15c800297a.tar.gz
webol-cli-b4f59c226c6916a3e45f1a52dc6a9b15c800297a.zip
basic cli, only start and get device
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
new file mode 100644
index 0000000..9aa8c08
--- /dev/null
+++ b/src/error.rs
@@ -0,0 +1,19 @@
1use std::fmt::Debug;
2
3pub enum CliError {
4 Reqwest(reqwest::Error),
5 Config(config::ConfigError),
6 Serde(serde_json::Error),
7 // Cli(Box<dyn std::error::Error>),
8}
9
10impl Debug for CliError {
11 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 match self {
13 Self::Reqwest(err) => { err.fmt(f) },
14 Self::Config(err) => { err.fmt(f) },
15 Self::Serde(err) => { err.fmt(f) },
16 // Self::Cli(err) => {err.fmt(f)},
17 }
18 }
19}