Properly expose errors in ads and tests (#8692)

* add code to expose errors outside zone

* remove unexpect error hiding

* remove uncessary code

* fix tests

* trying to catch more errros

* revert for testing

* wip

* wip

* figured out what was going on

* wip

* fix tests

* fix tests
This commit is contained in:
Anthony Dresser
2019-12-17 12:06:36 -08:00
committed by GitHub
parent 6b5c31410d
commit ea5f9be441
29 changed files with 483 additions and 790 deletions

View File

@@ -37,7 +37,6 @@ function initLoader(opts) {
baseUrl: bootstrap.uriFromPath(path.join(__dirname, '../../src')),
paths: {
'vs': `../${outdir}/vs`,
'sqltest': `../${outdir}/sqltest`, // {{SQL CARBON EDIT}}
'sql': `../${outdir}/sql`, // {{SQL CARBON EDIT}}
'lib': `../${outdir}/lib`,
'bootstrap-fork': `../${outdir}/bootstrap-fork`
@@ -120,6 +119,11 @@ function loadTests(opts) {
// collect unexpected errors
loader.require(['vs/base/common/errors'], function (errors) {
global.window.addEventListener('unhandledrejection', event => {
errors.onUnexpectedError(event.reason);
event.preventDefault();
});
errors.setUnexpectedErrorHandler(function (err) {
let stack = (err ? err.stack : null);
if (!stack) {