Trait artichoke::prelude::RubyException[][src]

pub trait RubyException: 'static + Error {
    fn message(&self) -> Cow<'_, [u8]>;
fn name(&self) -> Cow<'_, str>;
fn vm_backtrace(
        interp: &mut Artichoke
    ) -> Option<Vec<Vec<u8, Global>, Global>>;
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 raiseable sys::mrb_value.

Implementations on Foreign Types