Enum air::UncatchableError
source · pub enum UncatchableError {
TraceError {
trace_error: TraceHandlerError,
instruction: String,
},
GenerationCompatificationError(GenerationCompatificationError),
FoldStateNotFound(String),
IterableShadowing(String),
MultipleIterableValues(String),
CallResultNotCorrespondToInstr(ValueRef),
ShadowingIsNotAllowed(String),
ScalarsStateCorrupted {
scalar_name: String,
depth: usize,
},
CidError(CidCalculationError),
ValueForCidNotFound(&'static str, String),
StreamDontHaveSuchGeneration {
stream: Stream,
generation: Generation,
},
MalformedCallServiceFailed(Error),
}
Expand description
Uncatchable errors arisen during AIR script execution. Uncatchable here means that these errors couldn’t be handled by a xor instruction and their error_code couldn’t be used in a match instruction. They are similar to JVM runtime errors and some of them could be caught only while execution of AIR script, others (FoldStateNotFound and MultipleVariablesFound) are checked additionally on the validation step, and presence here for convenience.
Variants§
TraceError
Errors bubbled from a trace handler.
GenerationCompatificationError(GenerationCompatificationError)
These errors are related to internal bug in the interpreter when result trace is corrupted.
FoldStateNotFound(String)
Fold state wasn’t found for such iterator name.
IterableShadowing(String)
Errors encountered while shadowing non-scalar values.
MultipleIterableValues(String)
Multiple fold states found for such iterator name.
CallResultNotCorrespondToInstr(ValueRef)
Errors occurred when result from data doesn’t match to a call instruction, f.e. a call could be applied to a stream, but result doesn’t contain generation in a source position.
ShadowingIsNotAllowed(String)
Variable shadowing is not allowed, usually it’s thrown when a AIR tries to assign value for a variable not in a fold block or in a global scope but not right after new.
ScalarsStateCorrupted
This error occurred when new tries to pop up a variable at the end, but scalar state doesn’t contain an appropriate variable. It should be considered as an internal error and shouldn’t be caught by a xor instruction.
CidError(CidCalculationError)
ValueForCidNotFound(&'static str, String)
We consider now that every CID should present in the data; and not having any CID is considered a non-catching error.
StreamDontHaveSuchGeneration
Errors occurred while insertion of a value inside stream that doesn’t have corresponding generation.