Enum emacs::ErrorKind [−][src]
pub enum ErrorKind {
Signal {
symbol: TempValue,
data: TempValue,
},
Throw {
tag: TempValue,
value: TempValue,
},
WrongTypeUserPtr {
expected: &'static str,
},
}
Expand description
Error types generic to all Rust dynamic modules.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
Variants
An error signaled by Lisp code.
A non-local exit thrown by Lisp code.
An error indicating that the given value is not a user-ptr
of the expected type.
Examples:
#[defun]
fn wrap(x: i64) -> Result<RefCell<i64>> {
Ok(RefCell::new(x))
}
#[defun]
fn wrap_f(x: f64) -> Result<RefCell<f64>> {
Ok(RefCell::new(x))
}
#[defun]
fn unwrap(r: &RefCell<i64>) -> Result<i64> {
Ok(*r.try_borrow()?)
}
(unwrap 7) ; *** Eval error *** Wrong type argument: user-ptrp, 7
(unwrap (wrap 7)) ; 7
(unwrap (wrap-f 7)) ; *** Eval error *** Wrong type user-ptr: "expected: RefCell"
Fields of WrongTypeUserPtr
expected: &'static str