diff options
author | Veetaha <[email protected]> | 2020-06-22 19:18:36 +0100 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-06-22 19:18:36 +0100 |
commit | 3fd49d8b94c604cf672fe4dae5962b075a486475 (patch) | |
tree | 2ee789542ec75b4262a81ccd84657619b1a2d505 /editors | |
parent | eabbeec14c6624fb93344c25ecd79fe61972abbc (diff) |
Make bootstrap error message more informative and better-fitting
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/main.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 670f2ebfd..301754733 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -43,12 +43,16 @@ export async function activate(context: vscode.ExtensionContext) { | |||
43 | const config = new Config(context); | 43 | const config = new Config(context); |
44 | const state = new PersistentState(context.globalState); | 44 | const state = new PersistentState(context.globalState); |
45 | const serverPath = await bootstrap(config, state).catch(err => { | 45 | const serverPath = await bootstrap(config, state).catch(err => { |
46 | let message = "Failed to bootstrap rust-analyzer."; | 46 | let message = "bootstrap error. "; |
47 | |||
47 | if (err.code === "EBUSY" || err.code === "ETXTBSY") { | 48 | if (err.code === "EBUSY" || err.code === "ETXTBSY") { |
48 | message += " Other vscode windows might be using rust-analyzer, " + | 49 | message += "Other vscode windows might be using rust-analyzer, "; |
49 | "you should close them and reload this window to retry."; | 50 | message += "you should close them and reload this window to retry. "; |
50 | } | 51 | } |
51 | message += " Open \"Help > Toggle Developer Tools > Console\" to see the logs"; | 52 | |
53 | message += 'Open "Help > Toggle Developer Tools > Console" to see the logs '; | ||
54 | message += '(enable verbose logs with "rust-analyzer.trace.extension")'; | ||
55 | |||
52 | log.error("Bootstrap error", err); | 56 | log.error("Bootstrap error", err); |
53 | throw new Error(message); | 57 | throw new Error(message); |
54 | }); | 58 | }); |