More dangling promise cleanup (#8518)

* More dangling promise cleanup

* return void

* Function to async

* Fix a couple missed promises
This commit is contained in:
Charles Gagnon
2019-12-02 15:54:33 -08:00
committed by GitHub
parent 8cc60fde90
commit 4f8ced1f6b
8 changed files with 81 additions and 90 deletions

View File

@@ -22,6 +22,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
import { URI } from 'vs/base/common/uri';
import { firstIndex } from 'vs/base/common/arrays';
import { values } from 'vs/base/common/collections';
import { onUnexpectedError } from 'vs/base/common/errors';
export class AccountManagementService implements IAccountManagementService {
// CONSTANTS ///////////////////////////////////////////////////////////
@@ -314,8 +315,8 @@ export class AccountManagementService implements IAccountManagementService {
* Copy the user code to the clipboard and open a browser to the verification URI
*/
public copyUserCodeAndOpenBrowser(userCode: string, uri: string): void {
this._clipboardService.writeText(userCode);
this._openerService.open(URI.parse(uri));
this._clipboardService.writeText(userCode).catch(err => onUnexpectedError(err));
this._openerService.open(URI.parse(uri)).catch(err => onUnexpectedError(err));
}
// SERVICE MANAGEMENT METHODS //////////////////////////////////////////