-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.rs
More file actions
29 lines (28 loc) · 943 Bytes
/
errors.rs
File metadata and controls
29 lines (28 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use thiserror::Error;
#[derive(Error, Debug)]
pub enum TemplateError {
#[error("Git clone error: {0}")]
GitCloneError(String),
#[error("Template directory not found: {0}")]
InvalidTemplate(String),
#[error("Target directory creation failed: {0}")]
TargetError(String),
#[error("Copying error: {0}")]
CopyError(String),
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("Template directory not found on remote")]
TemplateNotFound,
#[error("No repository URL provided and no cache found.")]
MissingRepoUrl,
#[error("Invalid target path")]
InvalidTargetPath,
#[error("Home directory not found")]
HomeDirNotFound,
#[error("Failed to create configuration directory: {0}")]
ConfigDirCreationFailed(String),
#[error("Invalid JSON format: {0}")]
InvalidJsonFormat(String),
#[error("Invalid source URL: {0}")]
InvalidSourceUrl(String),
}