aquarium_control/utilities/
config_file_definition_error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ConfigFileDefinitionError {
5    /// The configuration file is not an existing file system entry.
6    #[error("The configuration file ({0}) is not an existing file system entry.")]
7    PathDoesNotExist(String),
8
9    /// The provided argument for the configuration file is not pointing to a file.
10    #[error("The provided argument for the configuration file ({0}) is not pointing to a file.")]
11    IsNotAFile(String),
12
13    /// The provided argument for the configuration file does not have any extension.
14    #[error("The provided argument for the configuration file ({0}) does not have any extension.")]
15    FileNameHasNoSuffix(String),
16
17    /// The provided argument for the configuration file does not have extension '.toml'.
18    #[error(
19        "The provided argument for the configuration file ({0}) does not have extension '.toml'."
20    )]
21    SuffixIsNotToml(String),
22}