Skip to main content

scientific_workflow/
error.rs

1//! Complete-workflow error composition.
2//!
3//! The crate root exposes the ordinary facade error; detailed StudyPlan and Runtime
4//! errors remain owned by their respective subsystem modules.
5
6use thiserror::Error;
7
8use crate::runtime::RuntimeError;
9use crate::study::StudyError;
10
11/// A failure while loading, preflighting, or executing one project.
12#[derive(Debug, Error)]
13#[non_exhaustive]
14pub enum WorkflowError {
15    /// Storage, process, socket or local workspace operation failed.
16    #[error(transparent)]
17    Io(#[from] std::io::Error),
18    /// A durable record could not be encoded or decoded.
19    #[error(transparent)]
20    Json(#[from] serde_json::Error),
21    /// Declarative study compilation failed before output creation.
22    #[error(transparent)]
23    StudyPlan(#[from] StudyError),
24    /// Active execution failed after a valid study was available.
25    #[error(transparent)]
26    Runtime(#[from] RuntimeError),
27}