Enum air::CatchableError
source · pub enum CatchableError {
LocalServiceError(i32, Rc<String>),
VariableNotFound(String),
IncompatibleJValueType {
variable_name: String,
actual_value: Value,
expected_value_type: &'static str,
},
FoldIteratesOverNonArray(Value, String),
MatchValuesNotEqual,
MismatchValuesEqual,
UserError {
error: Rc<Value>,
},
LambdaApplierError(LambdaError),
InvalidLastErrorObjectError(LastErrorObjectError),
VariableWasNotInitializedAfterNew(String),
LengthFunctorAppliedToNotArray(Value),
NonStringValueInTripletResolution {
variable_name: String,
actual_value: Value,
},
}
Expand description
Catchable errors arisen during AIR script execution. Catchable here means that these errors could be handled by a xor instruction and their error_code could be used in a match instruction.
Variants§
LocalServiceError(i32, Rc<String>)
An error is occurred while calling local service via call_service.
VariableNotFound(String)
Variable with such a name wasn’t defined during AIR script execution. This error type is used in order to support the join behaviour and it’s ok if some variable hasn’t been defined yet, due to the par nature of AIR.
IncompatibleJValueType
Provided JValue has incompatible type with a requested one.
FoldIteratesOverNonArray(Value, String)
A fold instruction must iterate over array value.
MatchValuesNotEqual
This error type is produced by a match to notify xor that compared values aren’t equal.
MismatchValuesEqual
This error type is produced by a mismatch to notify xor that compared values aren’t equal.
UserError
This error type is produced by a fail instruction.
LambdaApplierError(LambdaError)
An error occurred while trying to apply lambda to a value.
InvalidLastErrorObjectError(LastErrorObjectError)
This error type is produced by a fail instruction that tries to throw a scalar that have inappropriate type.
VariableWasNotInitializedAfterNew(String)
A new with this variable name was met and right after that it was accessed that is prohibited.
LengthFunctorAppliedToNotArray(Value)
This error type is occurred when the length functor applied to a value of non-array type.
NonStringValueInTripletResolution
Call gets non-string JValue resolving triplet parts.