Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
feat(error): fix #975, can config how to load blacklist zone stack frames - #1045
Merged
Conversation
JiaLiPassionforce-pushed
the
lazy-error
branch
2 times, most recently
from
March 11, 2018 11:58
f28a215 to
3c34addComparemhevery
previously approved these changes
Mar 14, 2018
mhevery
commented
Mar 14, 2018
Contributor
Could you resolve conflicts please? |
JiaLiPassionforce-pushed
the
lazy-error
branch
2 times, most recently
from
March 14, 2018 03:38
46b97ad to
85a6cb1CompareJiaLiPassion
commented
Mar 14, 2018
CollaboratorAuthor
@mhevery , I have resolved the conflict, the CI is red because |
mhevery
commented
Jun 18, 2018
Contributor
Sorry, more conflicts. |
JiaLiPassion
commented
Jun 18, 2018
CollaboratorAuthor
@mhevery , yes, the |
JiaLiPassionforce-pushed
the
lazy-error
branch
9 times, most recently
from
June 22, 2018 09:15
22af915 to
169e8c2Compare
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix#975.
current
zone-errorprovide several functionality.handle
class MyError extends Error,new MyError() instanceof Errorwill reportfalseissue.remove
zone.js internal stack trace frames.add
zoneinformation to eachzone frame.The No2 and No3. feature will slow down the
new Error()performance,So the motivation of this PR is to provide a flag to let user be able to disable No2 and No3.
The flag is
__Zone_Error_BlacklistedStackFrames_policy. And the available options is:default: this is the default one, if you load
zone.js/dist/zone-errorwithoutsetting the flag,
defaultwill be used, andBlackListStackFrameswill be availablewhen
new Error(), you can get aerror.stackwhich iszone stack free. But thiswill slow down
new Error()a little bit.disable: this will disable
BlackListZoneStackFramefeature, and if you loadzone.js/dist/zone-error, you will only get awrapped Errorwhich can handleError inheritissue.lazy: this is a feature to let you be able to get
BlackListZoneStackFramefeature,but not impact performance. But as a trade off, you can't get the
zone free stack framesby accesserror.stack. You can only get it by accesserror.zoneAwareStack.