tanu_core/error.rs
1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 /// Occurs when `tanu.toml` fails to load.
6 #[error("failed to load tanu.toml: {0}")]
7 LoadError(String),
8 /// Occurs when the specified key is not found in `tanu.toml`.
9 #[error("the specified key \"{0}\" not found in tanu.toml")]
10 ValueNotFound(String),
11 #[error("the specified value could not be casted to the desired type: {0}")]
12 ValueError(eyre::Error),
13}