Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Make better errors for meta updates after object destruction. #15347

Merged
merged 1 commit into from
Jun 11, 2017

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jun 10, 2017

Prior to this change the errors being thrown by Meta were extremely hard to track down since no "real" information was given.

After this change, all errors include the object.toString and property name in question (if applicable).

…ction.

Prior to this change the errors being thrown by `Meta` were
extremely hard to track down since no "real" information was
given.

After this change, all errors include the `object.toString` and
property name in question (if applicable).
@rwjblue
Copy link
Member Author

rwjblue commented Jun 10, 2017

/cc @runspired

@rwjblue rwjblue merged commit 0c487a4 into emberjs:master Jun 11, 2017
@rwjblue rwjblue deleted the make-better-errors branch June 11, 2017 16:23
@@ -374,7 +375,7 @@ export class Meta {
}

writeWatching(subkey, value) {
assert(`Cannot call writeWatching after the object is destroyed.`, !this.isMetaDestroyed());
assert(`Cannot update watchers for \`hello\` on \`${toString(this.source)}\` after it has been destroyed.`, !this.isMetaDestroyed());
Copy link

Choose a reason for hiding this comment

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

hello?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants