Introduce new for non iterable scalars (#248)

This commit is contained in:
Mike Voronov
2022-04-20 11:43:46 +03:00
committed by GitHub
parent c2bfad7f79
commit 69a42cf111
18 changed files with 473 additions and 47 deletions

View File

@ -82,6 +82,11 @@ pub enum CatchableError {
/// This error type is produced by a fail instruction that tries to throw a scalar that have inappropriate type.
#[error(transparent)]
InvalidLastErrorObjectError(#[from] LastErrorObjectError),
/// A new with this variable name was met and right after that it was accessed
/// that is prohibited.
#[error("variable with name '{0}' was cleared by new and then wasn't set")]
VariableWasNotInitializedAfterNew(String),
}
impl From<LambdaError> for Rc<CatchableError> {