forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zone.js): disable wrapping unhandled promise error by default
Before this commit, zone.js wraps the uncaught promise rejection error to a new Error object includes more information such as Zone stack traces. This feature is provided from the very beginning of Zone.js, but this feature becomes very annoying and make the user difficult to debug. So this commit disable this wrapping behavior by default, and user can enable this feature back by setting `DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION` to `false`.
- Loading branch information
1 parent
664099b
commit 6d7eb35
Showing
7 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
(window as any).global = window; | ||
// Change default symbol prefix for testing to ensure no hard-coded references. | ||
(window as any)['__Zone_symbol_prefix'] = '_test__'; | ||
(window as any)['_test__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION'] = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// Change default symbol prefix for testing to ensure no hard-coded references. | ||
(global as any)['__Zone_symbol_prefix'] = '__zone_symbol_test__'; | ||
(global as any)['__zone_symbol_test__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION'] = false; |