Skip to main content

ExtEvalError

Type Alias ExtEvalError 

Source
pub type ExtEvalError = EvalError;
Expand description

Re-exported tatara_lisp_eval::EvalError. Host intrinsics return this for type mismatches / runtime errors.

Aliased Type§

pub enum ExtEvalError {
    UnboundSymbol {
        name: Arc<str>,
        at: Span,
    },
    ArityMismatch {
        fn_name: Arc<str>,
        expected: Arity,
        got: usize,
        at: Span,
    },
    TypeMismatch {
        expected: &'static str,
        got: &'static str,
        at: Span,
    },
    DivisionByZero {
        at: Span,
    },
    NotCallable {
        value_kind: &'static str,
        at: Span,
    },
    BadSpecialForm {
        form: Arc<str>,
        reason: String,
        at: Span,
    },
    NativeFn {
        name: Arc<str>,
        reason: String,
        at: Span,
    },
    Reader(LispError),
    Halted,
    NotImplemented(&'static str),
    User {
        value: Value,
        at: Span,
    },
}

Variants§

§

UnboundSymbol

Fields

§name: Arc<str>
§at: Span
§

ArityMismatch

Fields

§fn_name: Arc<str>
§expected: Arity
§got: usize
§at: Span
§

TypeMismatch

Fields

§expected: &'static str
§got: &'static str
§at: Span
§

DivisionByZero

Fields

§at: Span
§

NotCallable

Fields

§value_kind: &'static str
§at: Span
§

BadSpecialForm

Fields

§form: Arc<str>
§reason: String
§at: Span
§

NativeFn

Fields

§name: Arc<str>
§reason: String
§at: Span
§

Reader(LispError)

§

Halted

§

NotImplemented(&'static str)

§

User

A Lisp-side error raised via (throw ...). Caught by (try ... (catch (e) ...)). The carried Value is whatever the user threw — conventionally a Value::Error produced by (error ...) / (ex-info ...), but any Value is allowed.

Fields

§value: Value
§at: Span