blob: f97637984f8e8f525eb1a99aba192fb8954f2348 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
use mqtt_channel::MqttError;
use tedge_config::{ConfigSettingError, TEdgeConfigError};
#[derive(Debug, thiserror::Error)]
pub enum WatchdogError {
#[error("Fail to run `{cmd}`: {from}")]
CommandExecError { cmd: String, from: std::io::Error },
#[error(transparent)]
FromTedgeConfigError(#[from] TEdgeConfigError),
#[error(transparent)]
FromConfigSettingError(#[from] ConfigSettingError),
#[error(transparent)]
FromMqttError(#[from] MqttError),
#[error(transparent)]
DeserializeError(#[from] serde_json::Error),
#[error(transparent)]
ParseWatchdogSecToInt(#[from] std::num::ParseIntError),
#[error(transparent)]
ParseSystemdFile(#[from] std::io::Error),
#[error("Did not find the WatchdogSec in {file}")]
NoWatchdogSec { file: String },
}
|