1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum EnvxError {
5 #[error("Environment variable not found: {0}")]
6 VarNotFound(String),
7
8 #[error("Permission denied: {0}")]
9 PermissionDenied(String),
10
11 #[error("Invalid variable name: {0}")]
12 InvalidVarName(String),
13
14 #[error("IO error: {0}")]
15 Io(#[from] std::io::Error),
16
17 #[error("Serialization error: {0}")]
18 Serialization(#[from] serde_json::Error),
19
20 #[error("Invalid variable name: {0}")]
21 InvalidName(String),
22
23 #[error("Other error: {0}")]
24 Other(String),
25}