summaryrefslogtreecommitdiff
path: root/systems/_config/src/error.rs
blob: 791aab2fc318f0e09f456bc921210957b2b7e617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::path::PathBuf;

#[derive(thiserror::Error, Debug)]
pub enum ConfigError {
    #[error("Failed to read config file: {0}")]
    ConfigReadFailed(#[source] std::io::Error),

    #[error("Failed to write config file: {0}")]
    ConfigWriteFailed(#[source] std::io::Error),

    #[error("Config file not found: {0}")]
    FileNotFound(PathBuf),

    #[error("IO error: {0}")]
    Io(#[source] std::io::Error),

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