rsiot/components/cmp_svg/
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("{COMPONENT_NAME} AttributeAccess: {0}")]
9 AttributeAccess(#[from] quick_xml::events::attributes::AttrError),
10
11 #[error("{COMPONENT_NAME} TaskEnd")]
12 TaskEnd,
13
14 #[error("{COMPONENT_NAME} | TokioSyncMpscSend")]
15 TokioSyncMpscSend,
16
17 #[error("{COMPONENT_NAME} | TokioTaskJoin: {0}")]
18 TokioTaskJoin(#[from] tokio::task::JoinError),
19
20 #[error("{COMPONENT_NAME} | VecToString: {0}")]
21 VecToString(#[from] std::string::FromUtf8Error),
22
23 #[error("{COMPONENT_NAME} WriteEvent: {0}")]
24 WriteEvent(std::io::Error),
25}
26
27impl From<Error> for ComponentError {
28 fn from(value: Error) -> Self {
29 ComponentError::Execution(value.to_string())
30 }
31}