Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

fix(error): fix #618, ZoneAwareError should copy Error's static properties as well #647

Merged
merged 1 commit into from
Mar 8, 2017

Conversation

JiaLiPassion
Copy link
Collaborator

@JiaLiPassion JiaLiPassion commented Feb 24, 2017

fix #618, ZoneAwareError copy the Error's prototype properties , but not the properties of Error itself (static one)

for example, if other library define some custom function to Native Error

Error.func = function() {}

then after zone.js patch Error, the func of Error will be lost.

in this PR, I also copy those properties from NativeError.

Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this SHA should be reverted?

@@ -9,6 +9,7 @@
module.exports = function (config) {
require('./karma-base.conf.js')(config);
config.files.push('build/test/wtf_mock.js');
config.files.push('build/test/custom_error.js');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add this file just to simulate a Error with customized method before patched by zone.js. so I can test the customized method is still valid after zone.js patch Error with ZoneAwareError.

@@ -0,0 +1,14 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this file being used.

Copy link
Collaborator Author

@JiaLiPassion JiaLiPassion Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -8,6 +8,7 @@

// Must be loaded before zone loads, so that zone can detect WTF.
import './wtf_mock';
import './custom_error';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhevery
Copy link
Contributor

mhevery commented Mar 7, 2017

This PR is failing travis, can you get it rebased and green?

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

1 similar comment
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot removed the cla: no label Mar 7, 2017
@googlebot
Copy link

CLAs look good, thanks!

@mhevery mhevery merged commit 2d30914 into angular:master Mar 8, 2017
@JiaLiPassion JiaLiPassion deleted the error branch March 17, 2017 03:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sharepoint 2013 conflict
3 participants