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

Improve {{#each}} errors logging #3312

Closed
MattiSG opened this issue Dec 18, 2014 · 8 comments
Closed

Improve {{#each}} errors logging #3312

MattiSG opened this issue Dec 18, 2014 · 8 comments

Comments

@MattiSG
Copy link

MattiSG commented Dec 18, 2014

_1 Upvote_ If I pass a currently non-iterable variable to a Spacebars {{#each}}, I get the following exception:

Exception from Tracker recompute function: {{#each}} currently only accepts arrays, cursors or falsey values.
[very long stack trace]

However, I have no hint as to which iterator failed. Even on a medium-sized app, it is extremely time-consuming to narrow down on the responsible template.

I expect the runtime to tell me the name of the template, and the line and column number of the failing iterator.

@MattiSG
Copy link
Author

MattiSG commented Dec 18, 2014

Update: I don't get an actual exception; the console logs that an exception happened, but it is a message relayed by debug.js rather than an error.

This doesn't change the need.

@stubailo stubailo added the Blaze label Dec 19, 2014
@avital
Copy link
Contributor

avital commented Feb 11, 2015

Yes, you're right -- at the moment, it's very hard to figure out which line in your .html file triggers this error. It might be tricky to get this right so I don't see us resolving this very soon, but I'll leave this issue open so that we can track how frequently people hit it.

@mixflame
Copy link

I'm hitting this issue. It happened randomly. I have tried returning false in all of my helpers.

@mixflame
Copy link

Got around it, but not sure how. This is a hard one to debug. Just saying.

@art3i
Copy link

art3i commented May 16, 2015

just happened now; got this same issue.

@vladholubiev
Copy link
Contributor

+1 faced this right now

@webdevbrian
Copy link

Getting this currently as well.

@hwillson
Copy link
Contributor

I've migrated this over to meteor/blaze#184 and added a repro. Closing here - thanks!

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

No branches or pull requests

8 participants