code complexity & repetition analysis tool
at main 23 lines 553 B view raw
1use std::io; 2use std::path::PathBuf; 3use thiserror::Error; 4 5#[derive(Error, Debug)] 6pub enum MccabreError { 7 #[error("Failed to read file {path}: {source}")] 8 FileRead { path: PathBuf, source: io::Error }, 9 10 #[error("Unsupported file type: {0}")] 11 UnsupportedFileType(String), 12 13 #[error("Invalid configuration: {0}")] 14 InvalidConfig(String), 15 16 #[error("Tokenization failed: {0}")] 17 TokenizationError(String), 18 19 #[error("IO error: {0}")] 20 Io(#[from] io::Error), 21} 22 23pub type Result<T> = std::result::Result<T, MccabreError>;