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

pub trait RubyException: 'static + Error {
    pub fn message(&self) -> Cow<'_, [u8]>;
pub fn name(&self) -> Cow<'_, str>;
pub fn vm_backtrace(
        &self,
        interp: &mut Artichoke
    ) -> Option<Vec<Vec<u8, Global>, Global>>;
pub 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 error::raise. Rust code can re-raise a trait object to propagate exceptions from native code back into the interpreter.

Required methods

pub fn message(&self) -> Cow<'_, [u8]>[src]

Message of the Exception.

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

pub fn name(&self) -> Cow<'_, str>[src]

Class name of the Exception.

pub fn vm_backtrace(
    &self,
    interp: &mut Artichoke
) -> Option<Vec<Vec<u8, Global>, Global>>
[src]

Optional backtrace specified by a Vec of frames.

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

Return a raiseable sys::mrb_value.

Loading content...

Trait Implementations

impl<'_> Error for &'_ (dyn RubyException + 'static)[src]

Implementations on Foreign Types

impl RubyException for SymbolOverflowError[src]

impl RubyException for ConvertBytesError[src]

impl RubyException for ConstantNameError[src]

impl RubyException for ArenaSavepointError[src]

impl RubyException for WriteError[src]

impl RubyException for InterpreterExtractError[src]

impl RubyException for DomainError[src]

impl RubyException for ArgCountError[src]

impl RubyException for NotDefinedError[src]

impl RubyException for NoBlockGiven[src]

impl RubyException for CaughtException[src]

impl RubyException for BoxIntoRubyError[src]

impl RubyException for Box<dyn RubyException + 'static, Global>[src]

impl RubyException for UnboxRubyError[src]

Loading content...

Implementors

impl RubyException for IncrementLinenoError[src]

impl RubyException for ArgumentError[src]

impl RubyException for EOFError[src]

impl RubyException for EncodingError[src]

impl RubyException for Error[src]

pub fn name(&self) -> Cow<'_, str>[src]

Class name of the Exception.

impl RubyException for 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 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]

Loading content...