pub enum ValueError {
Show 14 variants
WrongType {
expected: &'static str,
got: String,
},
IndexOutOfBounds {
idx: usize,
count: usize,
},
ArityError {
name: String,
expected: String,
got: usize,
},
NotCallable {
value: String,
},
OddMap {
count: usize,
},
Unsupported,
Other(String),
GasExhausted,
Cancelled,
MemoryLimitExceeded(MemoryLimitExceeded),
OutOfRange,
TransientAlreadyPersisted,
Parse,
Thrown(Value),
}Expand description
Value-level errors: type mismatches, arity errors, out-of-bounds, etc.
These are deliberately free of miette/NamedSource so they can be
constructed without source-location context. The evaluator wraps them
in CljxError::EvalError when it has a span.
Variants§
WrongType
IndexOutOfBounds
ArityError
NotCallable
OddMap
Unsupported
Other(String)
GasExhausted
Cancelled
Execution was cancelled; the gas budget was not exhausted.
Reserved for fiber cancellation (parking::catch_cancelled and
cancelled safepoints). It is uncatchable inside the cancelled
computation, but a future it settles is treated like future-cancel:
awaiters get a catchable exception, and an unread one is not reported
unless CLJRS_WARN_INTERRUPTED_FUTURES is enabled.
Native code must not return it for other failures.
MemoryLimitExceeded(MemoryLimitExceeded)
The process memory governor refused a governed allocation (strict
mode). Like GasExhausted, it is not catchable by Clojure code.
OutOfRange
TransientAlreadyPersisted
Parse
Thrown(Value)
Trait Implementations§
Source§impl Clone for ValueError
impl Clone for ValueError
Source§impl Debug for ValueError
impl Debug for ValueError
Source§impl Display for ValueError
impl Display for ValueError
Source§impl Error for ValueError
impl Error for ValueError
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()