#[derive(Debug, thiserror::Error)]
pub enum KnxIpError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("timeout waiting for {0}")]
Timeout(&'static str),
#[error("connection rejected: status {0:#04x}")]
ConnectionRejected(u8),
#[error("protocol error: {0}")]
Protocol(String),
#[error("connection closed")]
Closed,
#[error("invalid URL: {0}")]
InvalidUrl(String),
}