Skip to main content

rsigma_ir/
error.rs

1//! Error types for the lowering pipeline.
2
3#[derive(Debug, thiserror::Error)]
4pub enum IrError {
5    #[error("lowering error: {0}")]
6    Lowering(String),
7
8    #[error("unknown detection identifier: {0}")]
9    UnknownDetection(String),
10
11    #[error("invalid modifier combination: {0}")]
12    InvalidModifiers(String),
13
14    #[error("incompatible value for modifier: {0}")]
15    IncompatibleValue(String),
16
17    #[error("expected numeric value: {0}")]
18    ExpectedNumeric(String),
19
20    #[error("selector '{0}' matches no detection identifier")]
21    NoSelectorMatches(String),
22
23    #[error("custom attribute {0:?} could not be projected: {1}")]
24    CustomAttribute(String, String),
25
26    #[error("parser error in IR context: {0}")]
27    Parser(#[from] rsigma_parser::SigmaParserError),
28}