dei_core/
error.rs

1//! Error types for the dei analyzer
2
3use std::path::PathBuf;
4use thiserror::Error;
5
6pub type Result<T, E = Error> = std::result::Result<T, E>;
7
8#[derive(Debug, Error)]
9pub enum Error {
10    #[error("IO error: {0}")]
11    Io(#[from] std::io::Error),
12
13    #[error("Parse error in {path}: {message}")]
14    Parse { path: PathBuf, message: String },
15
16    #[error("Analysis error: {0}")]
17    Analysis(String),
18
19    #[error("Clustering error: {0}")]
20    Clustering(String),
21
22    #[error("Invalid configuration: {0}")]
23    Config(String),
24
25    #[error("Path not found: {0}")]
26    PathNotFound(PathBuf),
27
28    #[error("Unsupported language: {0}")]
29    UnsupportedLanguage(String),
30}
31