cat_dev/mion/proto/control/errors.rs
1//! Error types related to MION Control related data.
2
3use miette::Diagnostic;
4use thiserror::Error;
5
6/// Errors specifically for MION Control Protocol related errors.
7#[derive(Diagnostic, Error, Debug, PartialEq, Eq)]
8pub enum MIONControlProtocolError {
9 /// Unknown Packet Type/Command.
10 #[error("Unknown Code aka Packet Type for MION CONTROL: `{0}` received from the network (this may mean your CAT-DEV is doing something we didn't expect)")]
11 #[diagnostic(code(cat_dev::net::parse::mion::control::unknown_packet_type))]
12 UnknownCommand(u8),
13}