Add error types for edit functionality

This commit is contained in:
Matthias Beyer 2016-03-24 11:50:26 +01:00
parent eb74b4b1dc
commit e3bb5e3797

View file

@ -6,6 +6,8 @@ use std::fmt::Error as FmtError;
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum RuntimeErrorKind {
Instantiate,
IOError,
ProcessExitFailure,
// more?
}
@ -29,7 +31,9 @@ impl RuntimeError {
fn runtime_error_kind_as_str(e: &RuntimeErrorKind) -> &'static str {
match e {
&RuntimeErrorKind::Instantiate => "Could not instantiate",
&RuntimeErrorKind::Instantiate => "Could not instantiate",
&RuntimeErrorKind::IOError => "IO Error",
&RuntimeErrorKind::ProcessExitFailure => "Process exited with failure",
}
}