cat_dev/net/client/
errors.rs1use miette::{Diagnostic, Report};
4use thiserror::Error;
5
6#[derive(Diagnostic, Error, Debug)]
7pub enum CommonNetClientNetworkError {
8 #[error("This client tried to send/receive packets but was not connected to a server.")]
9 #[diagnostic(code(cat_dev::net::client::not_connected_to_server))]
10 NotConnectedToServer,
11 #[error("This client tried to serialize a packet but failed: {0:?}")]
12 #[diagnostic(code(cat_dev::net::client::serialization_error))]
13 SerializationError(Report),
14 #[error("The client tried to queue up a packet to send but failed: {0:?}")]
15 #[diagnostic(code(cat_dev::net::client::cannot_queue_send))]
16 CannotQueueSend(String),
17}