Improve error display when VS Code fails to load

Was looking a bit janky with the style changes.
This commit is contained in:
Asher 2020-02-26 14:57:07 -06:00
parent a2639ac617
commit b00f6bf078
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 5 additions and 3 deletions

View File

@ -124,10 +124,12 @@ export class VscodeHttpProvider extends HttpProvider {
try {
return await this.getRoot(request, route)
} catch (error) {
const message = `${
this.isDev ? "It might not have finished compiling (check for 'Finished compilation' in the output)." : ""
const message = `<div>VS Code failed to load.</div> ${
this.isDev
? "<div>It might not have finished compiling.</div>Check for 'Finished compilation' in the output."
: ""
} <br><br>${error}`
return this.getErrorRoot(route, "VS Code failed to load", "VS Code failed to load", message)
return this.getErrorRoot(route, "VS Code failed to load", "500", message)
}
}