pub enum Error {
Parse(ParseErrorDetails),
Compile(String),
UnclosableFactory {
factory: String,
param: String,
},
Resource(String),
Dimension(String),
Transfer {
block: String,
value: Box<Expr>,
},
Runtime(String),
UndefinedSymbol(String),
Type {
expected: String,
actual: String,
},
Arity {
name: String,
expected: usize,
actual: usize,
},
}Variants§
Parse(ParseErrorDetails)
Compile(String)
UnclosableFactory
A read of the parameter param of the closure factory factory where
no scope holds the hidden variable its lambda captured it into.
Resource(String)
A compile-time ceiling was crossed (the work budget, a recursion or nesting depth). Never a licence to keep emitting: a fold that meets one propagates it instead of falling back to codegen (0014 P13).
Dimension(String)
An index / scalar / money mix, or a value of one dimension where another is required.
Transfer
A RETURN-FROM the evaluator reached unconditionally: the carried
value leaves the enclosing BLOCK named block. Never an operation
error, so a fold or probe that meets one propagates it (0014 P14).
Runtime(String)
UndefinedSymbol(String)
Type
Arity
Implementations§
Source§impl Error
impl Error
pub fn parse(message: String, input: &str, span: Range<usize>) -> Self
Sourcepub fn undefined_symbol(name: &str) -> Self
pub fn undefined_symbol(name: &str) -> Self
The error of a read of the undefined name; a closure factory’s hidden
variable no scope holds is the compile error naming the factory.
pub fn render(&self, use_color: bool) -> String
pub fn render_auto(&self) -> String
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()