/// Convert syntax error to spanned evaluation exception
Convert syntax error to spanned evaluation exception
Convert syntax error to spanned evaluation exception
pub(crate) fn throw<'v, T>(
    r: anyhow::Result<T>,
    span: Span,
    eval: &Evaluator<'v, '_>,
) -> Result<T, EvalException<'v>> {
    match r {
        Ok(v) => Ok(v),
        Err(e) => throw_error(e, span, eval),
    }
}
pub ( crate ) fn throw < ' v , T > ( r : anyhow :: Result < T > , span : Span , eval : & Evaluator < ' v , ' _ > , ) -> Result < T , EvalException < ' v > > { match r { Ok ( v ) => Ok ( v ) , Err ( e ) => throw_error ( e , span , eval ) , } }
Convert syntax error to spanned evaluation exception
Convert syntax error to spanned evaluation exception
r
anyhow::Result<T>
span
Span
eval
&Evaluator<'v, '_>