2016-05-19 15:05:14 +00:00
|
|
|
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
|
|
|
|
2016-05-15 14:53:31 +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 {
|
2016-05-27 08:27:06 +00:00
|
|
|
RuntimeErrorKind::IOError.into_error_with_cause(Box::new(ioe))
|
2016-03-24 11:29:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|