jtool-core 0.2.1

core library for jtool
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum CoreError {
    #[error("Configuration error: {0}")]
    Config(String),

    #[error("Server '{0}' not found in configuration")]
    ServerNotFound(String),

    #[error("No default server configured")]
    NoDefaultServer,

    #[error("Home directory not found")]
    NoHomeDirectory,

    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Serialization error: {0}")]
    Serialization(#[from] serde_json::Error),

    #[error("TOML parsing error: {0}")]
    TomlParse(#[from] toml::de::Error),

    #[error("TOML serialization error: {0}")]
    TomlSerialize(#[from] toml::ser::Error),

    #[error("Session error: {0}")]
    Session(String),
}