supreme_hook_config/
error.rs1use std::path::PathBuf;
6
7#[derive(Debug, thiserror::Error)]
8pub enum HookConfigError {
9 #[error("failed to read hook config from {path}: {source}")]
10 Read {
11 path: PathBuf,
12 #[source]
13 source: std::io::Error,
14 },
15 #[error("failed to write hook config to {path}: {source}")]
16 Write {
17 path: PathBuf,
18 #[source]
19 source: std::io::Error,
20 },
21 #[error("failed to parse hook config: {0}")]
22 Parse(#[from] serde_json::Error),
23 #[error("mod config at {path} failed validation: {reasons}")]
24 Invalid { path: PathBuf, reasons: String },
25}