Skip to content

Commit

Permalink
Give a better message if the binary is missing. (#2975)
Browse files Browse the repository at this point in the history
* Give a better message if the binary is missing.
  • Loading branch information
sean-mcmanus authored Jan 3, 2019
1 parent c727cec commit de9cc71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { SettingsTracker, getTracker } from './settingsTracker';
import { getTestHook, TestHook } from '../testHook';
import { getCustomConfigProviders, CustomConfigurationProviderCollection, CustomConfigurationProvider1 } from '../LanguageServer/customProviders';
import { ABTestSettings, getABTestSettings } from '../abTesting';
import * as fs from 'fs';

let ui: UI;
const configProviderTimeout: number = 2000;
Expand Down Expand Up @@ -353,6 +354,10 @@ class DefaultClient implements Client {

private createLanguageClient(allClients: ClientCollection, workspaceFolder?: vscode.WorkspaceFolder): LanguageClient {
let serverModule: string = getLanguageServerFileName();
let exeExists: boolean = fs.existsSync(serverModule);
if (!exeExists) {
throw String('Missing binary at ' + serverModule);
}
let serverName: string = this.getName(workspaceFolder);

let serverOptions: ServerOptions = {
Expand Down

0 comments on commit de9cc71

Please sign in to comment.