logo
pub trait RubyException: 'static + Error {
    fn message(&self) -> Cow<'_, [u8]>;
    fn name(&self) -> Cow<'_, str>;
    fn vm_backtrace(
        &self,
        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 raise-able sys::mrb_value.

Trait Implementations

Message of the Exception. Read more
Class name of the Exception.
Optional backtrace specified by a Vec of frames.
Return a raise-able sys::mrb_value.

Implementations on Foreign Types

Implementors