Skip to main content

varpulis_runtime/engine/
error.rs

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