daipendency_extractor/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use thiserror::Error;

/// Error whilst extracting public API
#[derive(Error, Debug)]
pub enum ExtractionError {
    #[error(transparent)]
    Io(#[from] std::io::Error),
    #[error("{0}")]
    Malformed(String),
}

/// Error whilst resolving a dependency path
#[derive(Error, Debug)]
pub enum DependencyResolutionError {
    #[error("Failed to retrieve dependency: {0}")]
    RetrievalFailure(String),
    #[error("'{0}' is not a dependency")]
    MissingDependency(String),
}