Skip to content

Commit

Permalink
warn about uncaught exceptions inside LazyPromise
Browse files Browse the repository at this point in the history
related to #37221
  • Loading branch information
joaomoreno committed Nov 1, 2017
1 parent 69deb41 commit 93338c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vs/workbench/services/extensions/node/lazyPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'use strict';

import { TPromise, ValueCallback, ErrorCallback } from 'vs/base/common/winjs.base';
import { onUnexpectedError } from 'vs/base/common/errors';

export class LazyPromise {

Expand Down Expand Up @@ -75,6 +76,10 @@ export class LazyPromise {

if (this._actual) {
this._actualErr(err);
} else {
// If nobody's listening at this point, it is safe to assume they never will,
// since resolving this promise is always "async"
onUnexpectedError(err);
}
}

Expand Down

0 comments on commit 93338c6

Please sign in to comment.