fix(execution-engine): treat non-defined stream as empty in canon (#347)

This PR forces `canon` instruction to treat streams as empty, it's crucial for deterministic behaviour.

Closes #346.
This commit is contained in:
Mike Voronov
2022-09-29 23:05:04 +03:00
committed by GitHub
parent e6443df591
commit 8889291af8
6 changed files with 96 additions and 25 deletions

View File

@ -88,10 +88,6 @@ pub enum CatchableError {
#[error("variable with name '{0}' was cleared by new and then wasn't set")]
VariableWasNotInitializedAfterNew(String),
/// Canon instruction can't canonicalize a stream since it's been found.
#[error("stream with name {0} wasn't defined, so canon instruction can't canonicalize it")]
StreamsForCanonNotFound(String),
/// This error type is occurred when the length functor applied to a value of non-array type.
#[error("the length functor could applied only to an array-like value, but it's applied to '{0}'")]
LengthFunctorAppliedToNotArray(JValue),