feat(notcore): add shared types, config, paths, error crate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
25
crates/notcore/src/error.rs
Normal file
25
crates/notcore/src/error.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum NotfilesError {
|
||||
#[error("config file error: {0}")]
|
||||
Config(String),
|
||||
|
||||
#[error("package not found: {name}")]
|
||||
PackageNotFound { name: String },
|
||||
|
||||
#[error("conflict at {path}: {reason}")]
|
||||
Conflict { path: PathBuf, reason: String },
|
||||
|
||||
#[error("path error: {0}")]
|
||||
Path(String),
|
||||
|
||||
#[error("state file error: {0}")]
|
||||
State(String),
|
||||
|
||||
#[error("{0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
#[error("{0}")]
|
||||
Other(String),
|
||||
}
|
||||
Reference in New Issue
Block a user