[][src]Trait mruby::extn::core::error::RubyException

pub trait RubyException: 'static + Sized {
    unsafe fn raise(interp: Mrb, message: &'static str) -> mrb_value { ... }
unsafe fn raisef<V>(
        interp: Mrb,
        message: &'static str,
        format: Vec<V>
    ) -> mrb_value
    where
        Value: FromMrb<V>
, { ... } }

Raise implementation for Exception structs.

Warning: Calling raise on an interpreter from outside the mruby VM call stack will result in a segfault. Raise should only be called from Rust functions that are exposed on the mruby interpreter via class::Spec and module::Spec.

Provided methods

unsafe fn raise(interp: Mrb, message: &'static str) -> mrb_value

Raise the Exception defined with this type with a message.

Warning: This function calls sys::mrb_sys_raise which modifies the stack with longjmp. mruby expects raise to be called at some stack frame below an eval. If this is not the case, mruby will segfault.

unsafe fn raisef<V>(
    interp: Mrb,
    message: &'static str,
    format: Vec<V>
) -> mrb_value where
    Value: FromMrb<V>, 

Loading content...

Implementors

impl RubyException for ArgumentError[src]

impl RubyException for Exception[src]

impl RubyException for IndexError[src]

impl RubyException for LoadError[src]

impl RubyException for RuntimeError[src]

impl RubyException for ScriptError[src]

impl RubyException for SyntaxError[src]

impl RubyException for TypeError[src]

Loading content...