pub enum Error {
ArgumentError(String),
TypeError(String),
}
Converts error to an exception class.
use rutie::result::Error;
use rutie::{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"));
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
The lower-level cause of this error, if any. Read more