pub trait RubyException: Error + 'static {
    fn message(&self) -> Cow<'_, [u8]>;
fn name(&self) -> Cow<'_, str>;
fn vm_backtrace(&self, interp: &mut Artichoke) -> Option<Vec<Vec<u8>>>;
fn as_mrb_value(&self, interp: &mut Artichoke) -> Option<mrb_value>; }
Expand description

Polymorphic exception type that corresponds to Ruby’s Exception.

All types that implement RubyException can be raised with error::raise. Rust code can re-raise a trait object to propagate exceptions from native code back into the interpreter.

Required methods

Message of the Exception.

This value is a byte slice since Ruby Strings are equivalent to Vec<u8>.

Class name of the Exception.

Optional backtrace specified by a Vec of frames.

Return a raise-able sys::mrb_value.

Implementations on Foreign Types