1use dpm_model::{ValidationError, WorkItemId};
2use thiserror::Error;
3#[derive(Debug, Error)]
4pub enum ScheduleError {
6 #[error(transparent)]
8 Validation(#[from] ValidationError),
9 #[error("schedule arithmetic overflow for work {0}")]
11 ArithmeticOverflow(WorkItemId),
12 #[error("dependency references missing work item {0}")]
13 MissingWorkItem(WorkItemId),
15 #[error("dependency graph contains a cycle")]
16 DependencyCycle,
18 #[error("invalid duration for work item {0}")]
19 InvalidDuration(WorkItemId),
21 #[error("schedule position {0} is outside the compiled dependency network")]
22 UnknownPosition(usize),
24 #[error("the projection needs working time beyond the supported calendar range")]
25 CalendarRange,
27 #[error("review delay {0} h must be finite and non-negative")]
28 InvalidReviewDelay(f64),
30 #[error("simulation requires at least one iteration")]
31 NoSimulationIterations,
33}