From e3bb5e37979bc57e897cd801f041db3d3a0ab8e0 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 24 Mar 2016 11:50:26 +0100 Subject: [PATCH] Add error types for edit functionality --- libimagrt/src/error.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libimagrt/src/error.rs b/libimagrt/src/error.rs index a1952b60..cbef32d6 100644 --- a/libimagrt/src/error.rs +++ b/libimagrt/src/error.rs @@ -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", } }