roadmap/
err.rs

1use thiserror::Error;
2
3/// Errors that can be returned for roadmaps.
4#[derive(Error, Debug)]
5pub enum RoadmapError {
6    #[error("roadmap has no goals, must have exactly one")]
7    NoGoals,
8
9    #[error("too many goals, must have exactly one: found {count:}: {}", .names.join(", "))]
10    ManyGoals { count: usize, names: Vec<String> },
11
12    #[error("step {name:} depends on missing {missing:}")]
13    MissingDep { name: String, missing: String },
14
15    #[error("step is not a mapping")]
16    StepNotMapping,
17
18    #[error("'depends' must be a list of step names")]
19    DependsNotNames,
20
21    #[error("unknown status: {0}")]
22    UnknownStatus(String),
23
24    #[error(transparent)]
25    SerdeError(#[from] marked_yaml::FromYamlError),
26}