summaryrefslogtreecommitdiff
path: root/src/repl.rs
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-02-11 11:01:28 -0800
committerRyan Dahl <ry@tinyclouds.org>2019-02-11 14:01:28 -0500
commit489c69f8e1c15c75461d24d91aa3e9c2a756e807 (patch)
tree7d1d68516742c75e7ac576662774e7718c55cecc /src/repl.rs
parentd26655371b796cf5dad762d1b7154c25251cb41d (diff)
REPL multiline support with recoverable errors (#1731)
Diffstat (limited to 'src/repl.rs')
-rw-r--r--src/repl.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/repl.rs b/src/repl.rs
index 107d8a187..55bf4a114 100644
--- a/src/repl.rs
+++ b/src/repl.rs
@@ -1,8 +1,6 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use rustyline;
-use rustyline::error::ReadlineError::Interrupted;
-
use crate::msg::ErrorKind;
use std::error::Error;
@@ -10,7 +8,6 @@ use crate::deno_dir::DenoDir;
use crate::errors::new as deno_error;
use crate::errors::DenoResult;
use std::path::PathBuf;
-use std::process::exit;
#[cfg(not(windows))]
use rustyline::Editor;
@@ -99,13 +96,8 @@ impl Repl {
.map(|line| {
self.editor.add_history_entry(line.as_ref());
line
- }).map_err(|e| match e {
- Interrupted => {
- self.save_history().unwrap();
- exit(1)
- }
- e => deno_error(ErrorKind::Other, e.description().to_string()),
- })
+ }).map_err(|e| deno_error(ErrorKind::Other, e.description().to_string()))
+ // Forward error to TS side for processing
}
}