add ConfigError variant for missing files

This should be used when the config contains a path but that file cannot be read.
This commit is contained in:
Johann150 2021-01-14 18:04:03 +01:00
parent ed8c163ff9
commit 1733c22b86
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1

View file

@ -144,6 +144,13 @@ pub enum ConfigError {
/// Configuration does not specify a server.
#[error("server not specified")]
ServerNotSpecified,
/// The specified file could not be read.
#[error("could not read file {}", file)]
FileMissing {
/// The supposed location of the file.
file: String,
},
}
/// A wrapper that combines toml's serialization and deserialization errors.