[][src]Function artichoke_backend::error::raise

pub unsafe fn raise<T>(mut guard: Guard<'_>, exception: T) -> ! where
    T: RubyException + Debug

Raise implementation for RubyException boxed trait objects.


This function unwinds the stack with longjmp, which will ignore all Rust landing pads for panics and exit routines for cleaning up borrows. Callers should ensure that only Copy items are alive in the current stack frame.

Because this precondition must hold for all frames between the caller and the closest sys::mrb_protect landing pad, this function should only be called in the entrypoint into Rust from mruby.