2026-02-05 19:37:36 +01:00
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
|
pub enum Error {
|
|
|
|
|
// Domain errors
|
|
|
|
|
#[error("Invalid scope: {0}")]
|
|
|
|
|
InvalidScope(String),
|
|
|
|
|
#[error("Invalid description: {0}")]
|
|
|
|
|
InvalidDescription(String),
|
|
|
|
|
// Infrastructure errors
|
|
|
|
|
#[error("Not a Jujutsu repository")]
|
|
|
|
|
NotARepository,
|
|
|
|
|
#[error("jj is not installed or not in PATH")]
|
|
|
|
|
JjNotFound,
|
|
|
|
|
#[error("jj command failed: {message}")]
|
|
|
|
|
JjCommand { message: String, stderr: String },
|
|
|
|
|
// Application errors
|
|
|
|
|
#[error("Operation cancelled by user")]
|
|
|
|
|
Cancelled,
|
|
|
|
|
#[error("Non-interactive terminal detected")]
|
2026-02-05 20:34:57 +01:00
|
|
|
NonInteractive,
|
2026-02-05 19:37:36 +01:00
|
|
|
}
|