Add error types for edit functionality
This commit is contained in:
parent
eb74b4b1dc
commit
e3bb5e3797
1 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,8 @@ use std::fmt::Error as FmtError;
|
||||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||||
pub enum RuntimeErrorKind {
|
pub enum RuntimeErrorKind {
|
||||||
Instantiate,
|
Instantiate,
|
||||||
|
IOError,
|
||||||
|
ProcessExitFailure,
|
||||||
|
|
||||||
// more?
|
// more?
|
||||||
}
|
}
|
||||||
|
@ -30,6 +32,8 @@ impl RuntimeError {
|
||||||
fn runtime_error_kind_as_str(e: &RuntimeErrorKind) -> &'static str {
|
fn runtime_error_kind_as_str(e: &RuntimeErrorKind) -> &'static str {
|
||||||
match e {
|
match e {
|
||||||
&RuntimeErrorKind::Instantiate => "Could not instantiate",
|
&RuntimeErrorKind::Instantiate => "Could not instantiate",
|
||||||
|
&RuntimeErrorKind::IOError => "IO Error",
|
||||||
|
&RuntimeErrorKind::ProcessExitFailure => "Process exited with failure",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue