sdivi_pipeline/error.rs
1use thiserror::Error;
2
3use crate::commit_extract::CommitExtractError;
4
5/// Errors produced by the sdivi-pipeline orchestration layer.
6#[derive(Debug, Error)]
7#[non_exhaustive]
8pub enum PipelineError {
9 /// I/O error during file reading, snapshot writing, or cache access.
10 #[error("I/O error: {0}")]
11 Io(#[from] std::io::Error),
12
13 /// No tree-sitter grammar was found for any language detected in the
14 /// repository. Analysis cannot proceed.
15 #[error("no grammar available for any detected language in the repository")]
16 NoGrammarsAvailable,
17
18 /// Configuration error surfaced from within the pipeline.
19 #[error("configuration error: {0}")]
20 Config(#[from] sdivi_config::ConfigError),
21
22 /// I/O error while writing a snapshot file or persisting the partition cache.
23 #[error("snapshot write error: {0}")]
24 SnapshotIo(std::io::Error),
25
26 /// Failure during historical-commit ref resolution or tree extraction.
27 #[error("commit extract error: {0}")]
28 CommitExtract(#[from] CommitExtractError),
29}