Enum ruru::result::Error [] [src]

pub enum Error {
    ArgumentError(String),
    TypeError(String),
}

Variants

Methods

impl Error
[src]

Converts error to an exception class.

Examples

use ruru::result::Error;
use ruru::{Class, VM};

let argument_error = Error::ArgumentError("Argument is missing".to_string());
let type_error = Error::TypeError("Wrong type".to_string());

assert_eq!(argument_error.to_exception(), Class::from_existing("ArgumentError"));
assert_eq!(type_error.to_exception(), Class::from_existing("TypeError"));

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl PartialEq for Error
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl Error for Error
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more