Enum jrsonnet_evaluator::error::ErrorKind
source · #[non_exhaustive]
pub enum ErrorKind {
Show 51 variants
IntrinsicNotFound(IStr),
UnaryOperatorDoesNotOperateOnType(UnaryOpType, ValType),
BinaryOperatorDoesNotOperateOnValues(BinaryOpType, ValType, ValType),
NoTopLevelObjectFound,
CantUseSelfOutsideOfObject,
NoSuperFound,
InComprehensionCanOnlyIterateOverArray,
ArrayBoundsError(usize, usize),
StringBoundsError(usize, usize),
AssertionFailed(IStr),
VariableIsNotDefined(IStr, Vec<IStr>),
DuplicateLocalVar(IStr),
TypeMismatch(&'static str, Vec<ValType>, ValType),
NoSuchField(IStr, Vec<IStr>),
OnlyFunctionsCanBeCalledGot(ValType),
UnknownFunctionParameter(String),
BindingParameterASecondTime(IStr),
TooManyArgsFunctionHas(usize, Vec<(Option<IStr>, bool)>),
FunctionParameterNotBoundInCall(Option<IStr>, Vec<(Option<IStr>, bool)>),
UndefinedExternalVariable(IStr),
FieldMustBeStringGot(ValType),
DuplicateFieldName(IStr),
AttemptedIndexAnArrayWithString(IStr),
ValueIndexMustBeTypeGot(ValType, ValType, ValType),
CantIndexInto(ValType),
ValueIsNotIndexable(ValType),
StandaloneSuper,
ImportFileNotFound(SourcePath, String),
AbsoluteImportFileNotFound(PathBuf),
ResolvedFileNotFound(SourcePath),
ImportIsADirectory(SourcePath),
ImportBadFileUtf8(SourcePath),
ImportIo(String),
ImportNotSupported(SourcePath, String),
AbsoluteImportNotSupported(PathBuf),
CantImportFromVirtualFile,
ImportSyntaxError {
path: Source,
error: Box<ParseError>,
},
RuntimeError(IStr),
StackOverflow,
InfiniteRecursionDetected,
FractionalIndex,
DivisionByZero,
StringManifestOutputIsNotAString,
StreamManifestOutputIsNotAArray,
MultiManifestOutputIsNotAObject,
StreamManifestOutputCannotBeRecursed,
StreamManifestCannotNestString,
ImportCallbackError(String),
InvalidUnicodeCodepointGot(u32),
Format(FormatError),
TypeError(TypeLocError),
}
Expand description
Possible errors
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IntrinsicNotFound(IStr)
UnaryOperatorDoesNotOperateOnType(UnaryOpType, ValType)
BinaryOperatorDoesNotOperateOnValues(BinaryOpType, ValType, ValType)
NoTopLevelObjectFound
CantUseSelfOutsideOfObject
NoSuperFound
InComprehensionCanOnlyIterateOverArray
ArrayBoundsError(usize, usize)
StringBoundsError(usize, usize)
AssertionFailed(IStr)
VariableIsNotDefined(IStr, Vec<IStr>)
DuplicateLocalVar(IStr)
TypeMismatch(&'static str, Vec<ValType>, ValType)
NoSuchField(IStr, Vec<IStr>)
OnlyFunctionsCanBeCalledGot(ValType)
UnknownFunctionParameter(String)
BindingParameterASecondTime(IStr)
TooManyArgsFunctionHas(usize, Vec<(Option<IStr>, bool)>)
FunctionParameterNotBoundInCall(Option<IStr>, Vec<(Option<IStr>, bool)>)
UndefinedExternalVariable(IStr)
FieldMustBeStringGot(ValType)
DuplicateFieldName(IStr)
AttemptedIndexAnArrayWithString(IStr)
ValueIndexMustBeTypeGot(ValType, ValType, ValType)
CantIndexInto(ValType)
ValueIsNotIndexable(ValType)
StandaloneSuper
ImportFileNotFound(SourcePath, String)
AbsoluteImportFileNotFound(PathBuf)
ResolvedFileNotFound(SourcePath)
ImportIsADirectory(SourcePath)
ImportBadFileUtf8(SourcePath)
ImportIo(String)
ImportNotSupported(SourcePath, String)
AbsoluteImportNotSupported(PathBuf)
CantImportFromVirtualFile
ImportSyntaxError
RuntimeError(IStr)
StackOverflow
InfiniteRecursionDetected
FractionalIndex
DivisionByZero
StringManifestOutputIsNotAString
StreamManifestOutputIsNotAArray
MultiManifestOutputIsNotAObject
StreamManifestOutputCannotBeRecursed
StreamManifestCannotNestString
ImportCallbackError(String)
InvalidUnicodeCodepointGot(u32)
Format(FormatError)
TypeError(TypeLocError)
Trait Implementations§
source§impl Error for ErrorKind
impl Error for ErrorKind
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FormatError> for ErrorKind
impl From<FormatError> for ErrorKind
source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
source§impl From<StackOverflowError> for ErrorKind
impl From<StackOverflowError> for ErrorKind
source§fn from(_: StackOverflowError) -> Self
fn from(_: StackOverflowError) -> Self
Converts to this type from the input type.