diff options
author | Edwin Cheng <[email protected]> | 2020-04-23 17:06:01 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-04-23 17:06:01 +0100 |
commit | 07444976998122ca81dec7cca1f761c5b8b84f79 (patch) | |
tree | 83012e2e4044a87e1b598e47100eaee8f82d95ae /crates/ra_proc_macro_srv/src | |
parent | 278bf351e3d9bf074b76f89afa04c4727d55fba6 (diff) |
Panic proc macro srv if read request failed
Diffstat (limited to 'crates/ra_proc_macro_srv/src')
-rw-r--r-- | crates/ra_proc_macro_srv/src/cli.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_proc_macro_srv/src/cli.rs b/crates/ra_proc_macro_srv/src/cli.rs index 5f1f3ba3c..7bfa4312a 100644 --- a/crates/ra_proc_macro_srv/src/cli.rs +++ b/crates/ra_proc_macro_srv/src/cli.rs | |||
@@ -8,8 +8,9 @@ pub fn run() { | |||
8 | loop { | 8 | loop { |
9 | let req = match read_request() { | 9 | let req = match read_request() { |
10 | Err(err) => { | 10 | Err(err) => { |
11 | eprintln!("Read message error on ra_proc_macro_srv: {}", err); | 11 | // Panic here, as the stdin pipe may be closed. |
12 | continue; | 12 | // Otherwise, client will be restart the service anyway. |
13 | panic!("Read message error on ra_proc_macro_srv: {}", err); | ||
13 | } | 14 | } |
14 | Ok(None) => continue, | 15 | Ok(None) => continue, |
15 | Ok(Some(req)) => req, | 16 | Ok(Some(req)) => req, |