Module errata

Source
Expand description

Expression and evaluation error representation.

This module defines the Errata enum that represents errors encountered during expression parsing and evaluation in the AIMX expression engine. Errata captures error information at different levels of detail, from simple error messages to full diagnostic information including the problematic formula and location.

The Errata type is used throughout the AIMX expression engine to provide detailed error information that helps users understand what went wrong and where the error occurred in their expressions.

§Examples

Creating different levels of error information:

use aimx::values::Errata;

// Basic error with just a reason
let basic_error = Errata::One { reason: "Syntax Error".to_string() };
 
// Error with formula context
let formula_error = Errata::Two {
    reason: "Division by zero".to_string(),
    formula: "10 / 0".to_string(),
};
 
// Full diagnostic error
let diagnostic_error = Errata::Three {
    reason: "Unexpected token".to_string(),
    formula: "1 + * 2".to_string(),
    location: "* 2".to_string(),
};

Enums§

Errata
Represents expression and evaluation errors with varying levels of detail.