pub enum ExecutionError {
Show 17 variants
InvalidArgumentCount {
expected: usize,
actual: usize,
},
UnsupportedTargetType {
target: Value,
},
NotSupportedAsMethod {
method: String,
target: Value,
},
UnsupportedKeyType(Value),
UnexpectedType {
got: String,
want: String,
},
NoSuchKey(Arc<String>),
UndeclaredReference(Arc<String>),
MissingArgumentOrTarget,
ValuesNotComparable(Value, Value),
UnsupportedUnaryOperator(&'static str, Value),
UnsupportedBinaryOperator(&'static str, Value, Value),
UnsupportedMapIndex(Value),
UnsupportedListIndex(Value),
UnsupportedIndex(Value, Value),
UnsupportedFunctionCallIdentifierType(Expression),
UnsupportedFieldsConstruction(Member),
FunctionError {
function: String,
message: String,
},
}
Variants§
InvalidArgumentCount
UnsupportedTargetType
NotSupportedAsMethod
UnsupportedKeyType(Value)
Indicates that the script attempted to use a value as a key in a map, but the type of the value was not supported as a key.
UnexpectedType
NoSuchKey(Arc<String>)
Indicates that the script attempted to reference a key on a type that was missing the requested key.
UndeclaredReference(Arc<String>)
Indicates that the script attempted to reference an undeclared variable method, or function.
MissingArgumentOrTarget
Indicates that a function expected to be called as a method, or to be called with at least one parameter.
ValuesNotComparable(Value, Value)
Indicates that a comparison could not be performed.
UnsupportedUnaryOperator(&'static str, Value)
Indicates that an operator was used on a type that does not support it.
UnsupportedBinaryOperator(&'static str, Value, Value)
Indicates that an unsupported binary operator was applied on two values where it’s unsupported, for example list + map.
UnsupportedMapIndex(Value)
Indicates that an unsupported type was used to index a map
UnsupportedListIndex(Value)
Indicates that an unsupported type was used to index a list
UnsupportedIndex(Value, Value)
Indicates that an unsupported type was used to index a list
UnsupportedFunctionCallIdentifierType(Expression)
Indicates that a function call occurred without an Expression::Ident
as the function identifier.
UnsupportedFieldsConstruction(Member)
Indicates that a Member::Fields
construction was attempted
which is not yet supported.
FunctionError
Indicates that a function had an error during execution.
Implementations§
Source§impl ExecutionError
impl ExecutionError
pub fn no_such_key(name: &str) -> Self
pub fn undeclared_reference(name: &str) -> Self
pub fn invalid_argument_count(expected: usize, actual: usize) -> Self
pub fn function_error<E: ToString>(function: &str, error: E) -> Self
pub fn unsupported_target_type(target: Value) -> Self
pub fn not_supported_as_method(method: &str, target: Value) -> Self
pub fn unsupported_key_type(value: Value) -> Self
pub fn missing_argument_or_target() -> Self
Trait Implementations§
Source§impl Clone for ExecutionError
impl Clone for ExecutionError
Source§fn clone(&self) -> ExecutionError
fn clone(&self) -> ExecutionError
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more