Function artichoke_backend::error::raise

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

Raise implementation for RubyException boxed trait objects.

§Safety

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 entry point into Rust from mruby.