rsiot/components/cmp_logger/
error.rs1use crate::executor::ComponentError;
2
3use super::COMPONENT_NAME;
4
5#[allow(missing_docs)]
6#[derive(Debug, thiserror::Error)]
7pub enum Error {
8 #[error("CmpOutput: {0}")]
9 CmpOutput(ComponentError),
10
11 #[error("FnOutput: {0}")]
12 FnInput(anyhow::Error),
13
14 #[error("FnOutput: {0}")]
15 FnOutput(anyhow::Error),
16
17 #[error("{COMPONENT_NAME} TaskEnd")]
18 TaskEnd,
19
20 #[error("{COMPONENT_NAME} | TokioSyncMpscSend")]
21 TokioSyncMpscSend,
22
23 #[error("{COMPONENT_NAME} | TokioTaskJoin: {0}")]
24 TokioTaskJoin(#[from] tokio::task::JoinError),
25}
26
27impl From<Error> for ComponentError {
28 fn from(value: Error) -> Self {
29 ComponentError::Execution(value.to_string())
30 }
31}