diff options
| author | Veetaha <veetaha2@gmail.com> | 2020-06-22 21:18:36 +0300 |
|---|---|---|
| committer | Veetaha <veetaha2@gmail.com> | 2020-06-22 21:18:36 +0300 |
| commit | 3fd49d8b94c604cf672fe4dae5962b075a486475 (patch) | |
| tree | 2ee789542ec75b4262a81ccd84657619b1a2d505 /editors/code/src | |
| parent | eabbeec14c6624fb93344c25ecd79fe61972abbc (diff) | |
| download | rust-3fd49d8b94c604cf672fe4dae5962b075a486475.tar.gz rust-3fd49d8b94c604cf672fe4dae5962b075a486475.zip | |
Make bootstrap error message more informative and better-fitting
Diffstat (limited to 'editors/code/src')
| -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 670f2ebfd62..301754733b6 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -43,12 +43,16 @@ export async function activate(context: vscode.ExtensionContext) { const config = new Config(context); const state = new PersistentState(context.globalState); const serverPath = await bootstrap(config, state).catch(err => { - let message = "Failed to bootstrap rust-analyzer."; + let message = "bootstrap error. "; + if (err.code === "EBUSY" || err.code === "ETXTBSY") { - message += " Other vscode windows might be using rust-analyzer, " + - "you should close them and reload this window to retry."; + message += "Other vscode windows might be using rust-analyzer, "; + message += "you should close them and reload this window to retry. "; } - message += " Open \"Help > Toggle Developer Tools > Console\" to see the logs"; + + message += 'Open "Help > Toggle Developer Tools > Console" to see the logs '; + message += '(enable verbose logs with "rust-analyzer.trace.extension")'; + log.error("Bootstrap error", err); throw new Error(message); }); |
