Skip to content

Commit

Permalink
Fixes #330: Initialisation exceptions swallowed
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Apr 3, 2018
1 parent 059dc86 commit c4bab17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2559,8 +2559,8 @@ export abstract class BaseLanguageClient {
});
connection.listen();
// Error is handled in the intialize call.
this.initialize(connection).then(undefined, () => { });
}, (error) => {
return this.initialize(connection);
}).then(undefined, (error) => {
this.state = ClientState.StartFailed;
this._onReadyCallbacks.reject(error);
this.error('Starting client failed', error);
Expand Down Expand Up @@ -2631,7 +2631,7 @@ export abstract class BaseLanguageClient {
this.initializeFeatures(connection);
this._onReadyCallbacks.resolve();
return result;
}, (error: any) => {
}).then<InitializeResult>(undefined, (error: any) => {
if (this._clientOptions.initializationFailedHandler) {
if (this._clientOptions.initializationFailedHandler(error)) {
this.initialize(connection);
Expand Down Expand Up @@ -2659,7 +2659,7 @@ export abstract class BaseLanguageClient {
});
}

private _clientGetRootPath(): string | undefined{
private _clientGetRootPath(): string | undefined {
let folders = Workspace.workspaceFolders;
if (!folders || folders.length === 0) {
return undefined;
Expand Down

0 comments on commit c4bab17

Please sign in to comment.