1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::PathBuf;

#[derive(thiserror::Error, Debug)]
#[allow(missing_copy_implementations)]
#[non_exhaustive]
/// Crate error.
pub enum Error {
  /// Failed to get current working directory
  #[error("Failed to get current working directory")]
  Pwd,
  /// Settings has no source path and can't be saved.
  #[error("Settings has no source path and can not be saved")]
  NoSource,
  /// Could not save settings.
  #[error("Could not save settings at {}: {}", .0.display(), .1)]
  SaveFailed(PathBuf, std::io::Error),
}