use std::io;
use std::num::ParseIntError;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Invalid command or arguments")]
CommandError { msg: String },
#[error("The server closed the connection")]
Disconnected,
#[error(transparent)]
IOError(#[from] io::Error),
#[error("Server error")]
ServerError { msg: String },
#[error("invalid value error")]
ValueError { msg: String },
#[error(transparent)]
ParseInteError(#[from] ParseIntError),
}