systemprompt_models/paths/
error.rs1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum PathError {
6 #[error("AppPaths not initialized - call AppPaths::init() first")]
7 NotInitialized,
8
9 #[error("AppPaths already initialized")]
10 AlreadyInitialized,
11
12 #[error("Required path not configured: {field}")]
13 NotConfigured { field: &'static str },
14
15 #[error("Path does not exist: {}", path.display())]
16 NotFound { path: PathBuf, field: &'static str },
17
18 #[error("Failed to canonicalize path {}: {source}", path.display())]
19 CanonicalizeFailed {
20 path: PathBuf,
21 field: &'static str,
22 #[source]
23 source: std::io::Error,
24 },
25
26 #[error("Binary not found: {name}")]
27 BinaryNotFound {
28 name: String,
29 searched: Vec<PathBuf>,
30 },
31}