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

Naive implementation for better error messages from $interpolate #1187

Closed
wants to merge 3 commits into from

Conversation

btford
Copy link
Contributor

@btford btford commented Jul 19, 2012

This is not yet complete, but I'm recording this so I don't lose my train of thought and get some feedback. It would be nice to know specifically what part of the interpolation failed. For instance, have the massage distinguish between foo() and bar throwing exceptions with input like: {{foo()}} and {{bar()}}. I also still need to add a test for this.

Addresses issue #832.

}).toThrow('Error while interpolating: {{err()}}\nError: oops');
}));

iit('should stop interpolation when encountering an exception', inject(function($interpolate, $compile, $rootScope) {
Copy link
Contributor

Choose a reason for hiding this comment

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

iit -> it

@IgorMinar
Copy link
Contributor

landed as d804bbc

@IgorMinar IgorMinar closed this Aug 30, 2012
@gregwebs
Copy link

I ran into this issue of not having a useful error message. I was going to open a ticket on github, but now I see it has already been solved. Can this be merged into a 1.0.4 release?

@gregwebs
Copy link

it cherry-picks cleanly to v1.0.3

@gregwebs
Copy link

I used this in production and found my error right away.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants