[][src]Trait artichoke_backend::exception::RubyException

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>; }

Polymorphic exception type that corresponds to Ruby's Exception.

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

Required methods

fn message(&self) -> Cow<[u8]>

Message of the Exception.

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

fn name(&self) -> Cow<str>

Class name of the Exception.

fn vm_backtrace(&self, interp: &mut Artichoke) -> Option<Vec<Vec<u8>>>

Optional backtrace specified by a Vec of frames.

fn as_mrb_value(&self, interp: &mut Artichoke) -> Option<mrb_value>

Return a raiseable sys::mrb_value.

Loading content...

Trait Implementations

impl<'_> Error for &'_ dyn RubyException[src]

Implementations on Foreign Types

impl RubyException for Box<dyn RubyException>[src]

impl RubyException for SymbolOverflowError[src]

Loading content...

Implementors

impl RubyException for NotDefinedError[src]

impl RubyException for IncrementLinenoError[src]

impl RubyException for NoBlockGiven[src]

impl RubyException for BoxIntoRubyError[src]

impl RubyException for UnboxRubyError[src]

impl RubyException for ConstantNameError[src]

impl RubyException for artichoke_backend::exception::Exception[src]

fn name(&self) -> Cow<str>[src]

Class name of the Exception.

impl RubyException for EnvArgumentError[src]

impl RubyException for ArgumentError[src]

impl RubyException for EOFError[src]

impl RubyException for EncodingError[src]

impl RubyException for artichoke_backend::extn::core::exception::Exception[src]

impl RubyException for Fatal[src]

impl RubyException for FiberError[src]

impl RubyException for FloatDomainError[src]

impl RubyException for FrozenError[src]

impl RubyException for IOError[src]

impl RubyException for artichoke_backend::extn::core::exception::IndexError[src]

impl RubyException for Interrupt[src]

impl RubyException for KeyError[src]

impl RubyException for LoadError[src]

impl RubyException for LocalJumpError[src]

impl RubyException for NameError[src]

impl RubyException for NoMemoryError[src]

impl RubyException for NoMethodError[src]

impl RubyException for NotImplementedError[src]

impl RubyException for RangeError[src]

impl RubyException for RegexpError[src]

impl RubyException for RuntimeError[src]

impl RubyException for ScriptError[src]

impl RubyException for SecurityError[src]

impl RubyException for SignalException[src]

impl RubyException for StandardError[src]

impl RubyException for StopIteration[src]

impl RubyException for SyntaxError[src]

impl RubyException for SystemCallError[src]

impl RubyException for SystemExit[src]

impl RubyException for SystemStackError[src]

impl RubyException for ThreadError[src]

impl RubyException for TypeError[src]

impl RubyException for UncaughtThrowError[src]

impl RubyException for ZeroDivisionError[src]

impl RubyException for DomainError[src]

impl RubyException for ConvertBytesError[src]

impl RubyException for InterpreterExtractError[src]

impl RubyException for artichoke_backend::gc::arena::IndexError[src]

impl RubyException for IoWriteError[src]

impl RubyException for WriteError[src]

impl RubyException for ArgCountError[src]

Loading content...