#[non_exhaustive]pub enum ConfigError {
Show 16 variants
DuplicateContentFile {
file: String,
config_path: PathBuf,
line: Option<usize>,
},
DuplicateArchiveFile {
file: String,
config_path: PathBuf,
line: Option<usize>,
},
CannotAddContentFile {
file: String,
config_path: PathBuf,
},
CannotAddArchiveFile {
file: String,
config_path: PathBuf,
},
DuplicateGroundcoverFile {
file: String,
config_path: PathBuf,
line: Option<usize>,
},
CannotAddGroundcoverFile {
file: String,
config_path: PathBuf,
},
InvalidGameSetting {
value: String,
config_path: PathBuf,
line: Option<usize>,
},
BadEncoding {
value: String,
config_path: PathBuf,
line: Option<usize>,
},
InvalidLine {
value: String,
config_path: PathBuf,
line: Option<usize>,
},
Io(Error),
NotFileOrDirectory(PathBuf),
CannotFind(PathBuf),
NotWritable(PathBuf),
SubconfigNotLoaded(PathBuf),
MaxDepthExceeded(PathBuf),
PlatformPathUnavailable(&'static str),
}Expand description
Errors that can arise while loading, mutating, or saving an OpenMW configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateContentFile
A content file (content=) appeared twice in the configuration chain.
DuplicateArchiveFile
A fallback-archive (fallback-archive=) appeared twice in the configuration chain.
CannotAddContentFile
OpenMWConfiguration::add_content_file
was called for a file that is already present.
CannotAddArchiveFile
OpenMWConfiguration::add_archive_file
was called for an archive that is already present.
DuplicateGroundcoverFile
A groundcover file (groundcover=) appeared twice in the configuration chain.
CannotAddGroundcoverFile
OpenMWConfiguration::add_groundcover_file
was called for a file that is already present.
InvalidGameSetting
A fallback= entry could not be parsed as a valid Key,Value pair.
BadEncoding
An encoding= entry contained an unrecognised encoding name.
Only win1250, win1251, and win1252 are valid.
InvalidLine
A line in an openmw.cfg file did not match any recognised key=value format.
Io(Error)
An I/O error occurred while reading or writing a config file.
NotFileOrDirectory(PathBuf)
The supplied path could not be classified as a file or directory.
CannotFind(PathBuf)
No openmw.cfg was found at the given path.
NotWritable(PathBuf)
The target path for a save operation is not writable.
SubconfigNotLoaded(PathBuf)
OpenMWConfiguration::save_subconfig
was called with a path that is not part of the loaded configuration chain.
MaxDepthExceeded(PathBuf)
The config= chain exceeded the maximum nesting depth, likely due to a circular reference.
Could not resolve a platform default path via dirs.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()