git.delta.rocks / jrsonnet / refs/commits / 7740dddc3e99

difftreelog

source

crates/jsonnet-evaluator/src/error.rs920 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	UnknownVariable(String),1112	UnknownFunctionParameter(String),13	BindingParameterASecondTime(String),14	TooManyArgsFunctionHas(usize),15	FunctionParameterNotBoundInCall(String),1617	UndefinedExternalVariable(String),1819	FieldMustBeStringGot(ValType),2021	AttemptedIndexAnArrayWithString(String),22	ValueIndexMustBeTypeGot(ValType, ValType, ValType),23	CantIndexInto(ValType),2425	StandaloneSuper,2627	RuntimeError(String),28	StackOverflow,29	FractionalIndex,30	DivisionByZero,31}3233#[derive(Clone, Debug)]34pub struct StackTraceElement(pub LocExpr, pub String);35#[derive(Debug)]36pub struct StackTrace(pub Vec<StackTraceElement>);3738#[derive(Debug)]39pub struct LocError(pub Error, pub StackTrace);40pub type Result<V> = std::result::Result<V, LocError>;