Better error handling for connection issues (no spam notifiations/retries)

pull/13/head
Kelvin Schoofs 7 years ago
parent 394ce3bea3
commit 310baa8b48

@ -207,9 +207,16 @@ export class Manager implements vscode.FileSystemProvider, vscode.TreeDataProvid
reject(e); reject(e);
} }
}).catch((e) => { }).catch((e) => {
delete this.creatingFileSystems[name]; vscode.window.showErrorMessage(`Error while connecting to SSH FS ${name}:\n${e.message}`, 'Retry', 'Configure', 'Ignore').then((chosen) => {
vscode.window.showErrorMessage(`Error while connecting to SSH FS ${name}:\n${e.message}`, 'Retry', 'Configure', 'Ignore') delete this.creatingFileSystems[name];
.then(chosen => chosen === 'Retry' ? this.createFileSystem(name).catch(console.error) : chosen === 'Configure' && this.commandConfigure(name)); if (chosen === 'Retry') {
this.createFileSystem(name).catch(console.error);
} else if (chosen === 'Configure') {
this.commandConfigure(name);
} else {
this.commandConfigDisconnect(name);
}
});
throw e; throw e;
}); });
return this.creatingFileSystems[name] = promise; return this.creatingFileSystems[name] = promise;

Loading…
Cancel
Save