14 lines
332 B
Rust
14 lines
332 B
Rust
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)
|
|
}
|