wick_settings/error.rs
1use std::path::PathBuf;
2
3#[derive(thiserror::Error, Debug)]
4#[allow(missing_copy_implementations)]
5#[non_exhaustive]
6/// Crate error.
7pub enum Error {
8 /// Failed to get current working directory
9 #[error("Failed to get current working directory")]
10 Pwd,
11 /// Settings has no source path and can't be saved.
12 #[error("Settings has no source path and can not be saved")]
13 NoSource,
14 /// Could not save settings.
15 #[error("Could not save settings at {}: {}", .0.display(), .1)]
16 SaveFailed(PathBuf, std::io::Error),
17}