Fix Promise that didn't reject because an error could get thrown

pull/13/head
Kelvin Schoofs 7 years ago
parent a58b62907d
commit 795a990308

@ -185,7 +185,11 @@ export class Manager implements vscode.FileSystemProvider, vscode.TreeDataProvid
}
reject(error);
});
client.connect(Object.assign(config, { tryKeyboard: false }));
try {
client.connect(Object.assign(config, { tryKeyboard: false }));
} catch (e) {
reject(e);
}
}).catch((e) => {
delete this.creatingFileSystems[name];
vscode.window.showErrorMessage(`Error while connecting to SSH FS ${name}:\n${e.message}`, 'Retry', 'Configure', 'Ignore')

Loading…
Cancel
Save