aboutsummaryrefslogtreecommitdiffstats
path: root/src/run/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/run/mod.rs')
-rw-r--r--src/run/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs
index 0b9aef8..d386590 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -155,6 +155,7 @@ impl Executor {
Ok(Err(e)) => match e {
BuiltinError::IO(_) => code = -1,
BuiltinError::Exit(c) => code = c,
+ BuiltinError::ParseError(_) => code = -2,
},
Err(_) => code = 127,
}
@@ -290,6 +291,7 @@ pub fn run(se: Arc<Mutex<Session>>, cmd: Vec<u8>) {
#[derive(Debug)]
pub enum BuiltinError {
IO(std::io::Error),
+ ParseError(&'static str),
Exit(i32),
}