mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Make bootstrap error message more informative and better-fitting
This commit is contained in:
parent
eabbeec14c
commit
3fd49d8b94
@ -43,12 +43,16 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
const config = new Config(context);
|
const config = new Config(context);
|
||||||
const state = new PersistentState(context.globalState);
|
const state = new PersistentState(context.globalState);
|
||||||
const serverPath = await bootstrap(config, state).catch(err => {
|
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") {
|
if (err.code === "EBUSY" || err.code === "ETXTBSY") {
|
||||||
message += " Other vscode windows might be using rust-analyzer, " +
|
message += "Other vscode windows might be using rust-analyzer, ";
|
||||||
"you should close them and reload this window to retry.";
|
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);
|
log.error("Bootstrap error", err);
|
||||||
throw new Error(message);
|
throw new Error(message);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user