git.delta.rocks / jrsonnet / refs/commits / 2bdb11ee2096

difftreelog

source

crates/jsonnet-evaluator/src/error.rs683 Bsourcehistory
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	UnknownFunctionParameter(String),11	BindingParameterASecondTime(String),12	TooManyArgsFunctionHas(usize),13	FunctionParameterNotBoundInCall(String),1415	RuntimeError(String),16	StackOverflow,17	FractionalIndex,18	DivisionByZero,19}2021#[derive(Clone, Debug)]22pub struct StackTraceElement(pub LocExpr, pub String);23#[derive(Debug)]24pub struct StackTrace(pub Vec<StackTraceElement>);2526#[derive(Debug)]27pub struct LocError(pub Error, pub StackTrace);28pub type Result<V> = std::result::Result<V, LocError>;