use anyhow::{anyhow, Error}; pub fn serial_error(name: String, pos: u32) -> Error { anyhow!( "Cannot convert Serial data for type '{}' at position {}.", name, pos ) } pub fn s7_read_error(name: String, pos: u32) -> Error { anyhow!("Cannot read Byte for type '{}' at position {}.", name, pos) }