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

update enqueueCallback invariant to more specifically denote type of passed callback #5193

Merged
merged 1 commit into from
Oct 16, 2015

Conversation

conorhastings
Copy link

closes #5172

@facebook-github-bot
Copy link

@conorhastings updated the pull request.

@jimfb
Copy link
Contributor

jimfb commented Oct 16, 2015

Thanks @conorhastings, this looks great!

In javascript most things are objects (so this protects against string and number but not much else). It probably makes sense to put the keys in parenthesis. So the message becomes: ...with a callback of type object (keys: foo, bar, noise). If you want to be fancy, we wouldn't print the keys if there are none or if there are more than 20 of them.

@conorhastings
Copy link
Author

@jimfb updated, do you mean something like this?

@facebook-github-bot
Copy link

@conorhastings updated the pull request.

@facebook-github-bot
Copy link

@conorhastings updated the pull request.

@facebook-github-bot
Copy link

@conorhastings updated the pull request.

@jimfb
Copy link
Contributor

jimfb commented Oct 16, 2015

@conorhastings Yep, that looks great! Thanks!

jimfb added a commit that referenced this pull request Oct 16, 2015
update enqueueCallback invariant to more specifically denote type of passed callback
@jimfb jimfb merged commit 0fc8f6a into facebook:master Oct 16, 2015
@conorhastings conorhastings deleted the enqueue-callback-error branch October 16, 2015 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enqueueCallback invariant should specify/identify actual object in failure message
3 participants