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

Problem with expression evaluation should contain expression in question #236

Closed
PK1A opened this issue Jul 9, 2014 · 1 comment
Closed
Labels

Comments

@PK1A
Copy link
Contributor

PK1A commented Jul 9, 2014

Consider this example: {myCollection | myFilter}. It might happen that the filtering expression (myFilter) is neither a function nor an object containing the apply function. In this case the error thrown will be:

[error] [function expression] Object is not a function:

Unfortunately this gives very little context about what is actually wrong. IN the ideal world a message could read like this:

error evaluating expression "myFilter": Object is not a function in "/template/name.hsp"

Otherwise it is rather hard to figure out what is going on in a more complex page.

Related to #234 but this issue specifically asks to have info about an expression being evaluated.

b-laporte pushed a commit to b-laporte/hashspace that referenced this issue Jul 14, 2014
@PK1A PK1A changed the title Problem with expression evaluation should contin expression in question Problem with expression evaluation should contain expression in question Jul 16, 2014
@PK1A PK1A added the bug label Jul 17, 2014
@PK1A
Copy link
Contributor Author

PK1A commented Sep 17, 2014

This got fixed with the migration to the Pratt's parser. For example using an invalid expression with the pipe operator will result in this message:

Error evaluating expression 'name | foo': Pipe expression is neither a function nor an object with the apply() method

See: http://plnkr.co/edit/ln7Gsinhf0gPCS1I2Roc?p=preview

@PK1A PK1A closed this as completed Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant