1use crate::ValType;2use jsonnet_parser::LocExpr;34#[derive(Debug)]5pub enum Error {6 VariableIsNotDefined(String),7 TypeMismatch(&'static str, Vec<ValType>, ValType),8 NoSuchField(String),910 RuntimeError(String),11 StackOverflow,12 FractionalIndex,13 DivisionByZero,14}1516#[derive(Clone, Debug)]17pub struct StackTraceElement(pub LocExpr, pub String);18#[derive(Debug)]19pub struct StackTrace(pub Vec<StackTraceElement>);2021#[derive(Debug)]22pub struct LocError(pub Error, pub StackTrace);23pub type Result<V> = std::result::Result<V, LocError>;