mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
Add messages for rejected promises
This commit is contained in:
@@ -54,7 +54,7 @@ export function promiseFromEvent<T, U>(
|
||||
let cancel = new EventEmitter<void>();
|
||||
return {
|
||||
promise: new Promise<U>((resolve, reject) => {
|
||||
cancel.event(_ => reject());
|
||||
cancel.event(_ => reject('Cancelled'));
|
||||
subscription = event((value: T) => {
|
||||
try {
|
||||
Promise.resolve(adapter(value, resolve, reject))
|
||||
|
||||
@@ -721,7 +721,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
|
||||
const didTimeout: Promise<MainThreadAuthenticationProvider> = new Promise((_, reject) => {
|
||||
setTimeout(() => {
|
||||
reject();
|
||||
reject('Timed out waiting for authentication provider to register');
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user