From f903cbd687bdf95b934e617e5a5ceea2e8dd963c Mon Sep 17 00:00:00 2001 From: Junfeng Li Date: Mon, 3 Sep 2018 17:29:30 -0700 Subject: [PATCH] Detailed error message when error spawning language server. --- src/languageclient.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/languageclient.rs b/src/languageclient.rs index 175e41fc..ea20bd48 100644 --- a/src/languageclient.rs +++ b/src/languageclient.rs @@ -2786,7 +2786,10 @@ impl State { .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(stderr) - .spawn()?; + .spawn() + .with_context(|err| { + format!("Failed to start language server ({:?}): {}", command, err) + })?; let child_id = Some(process.id()); let reader = Box::new(BufReader::new(