imag/libimagrt/src/error.rs

18 lines
429 B
Rust
Raw Normal View History

generate_error_imports!();
2016-03-24 11:29:42 +00:00
use std::io::Error as IOError;
2016-01-21 17:42:43 +00:00
generate_error_types!(RuntimeError, RuntimeErrorKind,
Instantiate => "Could not instantiate",
IOError => "IO Error",
ProcessExitFailure => "Process exited with failure"
);
2016-01-21 17:42:43 +00:00
2016-03-24 11:29:42 +00:00
impl From<IOError> for RuntimeError {
fn from(ioe: IOError) -> RuntimeError {
RuntimeError::new(RuntimeErrorKind::IOError, Some(Box::new(ioe)))
}
}