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

Don't depend on formatting args in error message in amp-list#layoutCallback #8818

Merged
merged 2 commits into from Apr 18, 2017

Conversation

kmh287
Copy link
Contributor

@kmh287 kmh287 commented Apr 18, 2017

Fixed a bug that caused amp-list to send a string to log#assert with fewer string placeholders than provided arguments.

Fixes #8814

/to @dvoytenko Let me know if you want me to update the assert function to better handle this situation.

@@ -57,7 +60,8 @@ export class AmpList extends AMP.BaseElement {
return templatesFor(this.win).findAndRenderTemplateArray(
this.element, items).then(this.rendered_.bind(this));
}, error => {
user().assert(false, error.message, this.element);
user().error(TAG,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make sure that catch itself fails:

throw user().createError('Error fetching amp-list', ..., error, ...);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

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.

None yet

3 participants