error.rs (1156B)
1 use thiserror::Error; 2 3 use std::path::PathBuf; 4 5 use crate::{RadrootsPathProfile, RadrootsPlatform}; 6 7 #[derive(Debug, Error, Clone, PartialEq, Eq)] 8 pub enum RadrootsRuntimePathsError { 9 #[error("interactive_user on {platform} requires a home directory")] 10 MissingHomeDir { platform: RadrootsPlatform }, 11 12 #[error("interactive_user on windows requires APPDATA and LOCALAPPDATA roots")] 13 MissingWindowsUserDirs, 14 15 #[error("service_host on windows requires a ProgramData root")] 16 MissingWindowsProgramDataDir, 17 18 #[error("repo_local requires an explicit repo-local base root")] 19 MissingRepoLocalRoot, 20 21 #[error("mobile_native requires explicit logical roots")] 22 MissingMobileRoots, 23 24 #[error("{profile} is not supported on {platform}")] 25 UnsupportedProfilePlatform { 26 profile: RadrootsPathProfile, 27 platform: RadrootsPlatform, 28 }, 29 30 #[error("runtime namespace `{value}` must be one non-empty path component")] 31 InvalidNamespaceComponent { value: String }, 32 33 #[error("shared accounts data root `{path:?}` has no parent shared data root")] 34 SharedAccountsDataRootMissingParent { path: PathBuf }, 35 }