Skip to main content

varpulis_runtime/engine/
error.rs

1//! Typed error hierarchy for the Varpulis engine.
2
3use crate::enrichment::EnrichmentError;
4use crate::persistence::StoreError;
5use varpulis_connectors::SinkError;
6
7/// Top-level error type returned by engine public methods.
8#[derive(Debug, thiserror::Error)]
9pub enum EngineError {
10    /// Compilation or program-loading error (bad VPL, missing streams, etc.)
11    #[error("compilation error: {0}")]
12    Compilation(String),
13
14    /// Referenced stream does not exist.
15    #[error("stream not found: {0}")]
16    StreamNotFound(String),
17
18    /// Sink I/O or protocol error.
19    #[error("sink error: {0}")]
20    Sink(#[from] SinkError),
21
22    /// Enrichment lookup error.
23    #[error("enrichment error: {0}")]
24    Enrichment(#[from] EnrichmentError),
25
26    /// State-store / persistence error.
27    #[error("store error: {0}")]
28    Store(#[from] StoreError),
29
30    /// Runtime pipeline error (evaluation, pattern matching, etc.)
31    #[error("pipeline error: {0}")]
32    Pipeline(String),
33}