git.delta.rocks / jrsonnet / refs/commits / ff03a2a1eb62

difftreelog

source

crates/jsonnet-evaluator/src/error.rs720 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	UndefinedExternalVariable(String),1617	RuntimeError(String),18	StackOverflow,19	FractionalIndex,20	DivisionByZero,21}2223#[derive(Clone, Debug)]24pub struct StackTraceElement(pub LocExpr, pub String);25#[derive(Debug)]26pub struct StackTrace(pub Vec<StackTraceElement>);2728#[derive(Debug)]29pub struct LocError(pub Error, pub StackTrace);30pub type Result<V> = std::result::Result<V, LocError>;