Skip to main content

jellyflow_runtime/profile/pipeline/
error.rs

1use crate::rules::Diagnostic;
2use jellyflow_core::ops::ApplyError;
3
4#[derive(Debug, thiserror::Error)]
5pub enum ApplyPipelineError {
6    #[error("failed to apply transaction ops")]
7    Apply(#[from] ApplyError),
8    #[error("concretization did not converge within bound={bound}")]
9    ConcretizeNonConvergent { bound: usize },
10    #[error("transaction rejected by diagnostics: {message}")]
11    Rejected {
12        message: String,
13        diagnostics: Vec<Diagnostic>,
14    },
15}
16
17impl ApplyPipelineError {
18    pub fn diagnostics(&self) -> Option<&[Diagnostic]> {
19        match self {
20            Self::Rejected { diagnostics, .. } => Some(diagnostics),
21            _ => None,
22        }
23    }
24}