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

Include partial name in 'undefined partial' exception message #1121

Merged

Conversation

shinypb
Copy link

@shinypb shinypb commented Oct 19, 2015

My project has occasionally had production issues with undefined partials due to programmer error, but we use enough partials that figuring out what's wrong can take a bit of sleuthing.

This patch changes the exception message to include the name of the partial in the error message. This seems in keeping with the general style of the codebase (for example, see various instances in runtime.js — e.g.:

throw new Exception('The partial ' + options.name + ' could not be found');`)

@kpdecker
Copy link
Collaborator

Glad to pull this in but lets go with template strings here (and use ' or " for the embedded identifier). (I believe those are turned on the project options, let me know if they aren't)

@shinypb
Copy link
Author

shinypb commented Oct 19, 2015

Thanks, @kpdecker — I made those changes and appreciate the review. (I tend to shy away from ES6 stuff until asked for it at this point.)

@kpdecker
Copy link
Collaborator

Looks great. Will merge after travis finishes.

kpdecker added a commit that referenced this pull request Oct 19, 2015
Include partial name in 'undefined partial' exception message
@kpdecker kpdecker merged commit d20f02d into handlebars-lang:master Oct 19, 2015
@kpdecker
Copy link
Collaborator

Released in 4.0.4

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

Successfully merging this pull request may close these issues.

2 participants