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

add current file name to error message #164

Merged

Conversation

mpalpha
Copy link
Contributor

@mpalpha mpalpha commented Mar 20, 2019

Prepend the current file to the transformer error message.

@mpalpha
Copy link
Contributor Author

mpalpha commented Mar 20, 2019

should fix #163

@ismay ismay self-requested a review March 21, 2019 08:11
lib/index.js Outdated Show resolved Hide resolved
@ismay
Copy link
Contributor

ismay commented Mar 21, 2019

Hi @mpalpha, thanks for the PR! That's a good suggestion. Besides using the reject callback (see comment), would you mind opening a PR for the same change in metalsmith-layouts, and adding/updating relevant tests once we've resolved the outstanding issues? Thanks!

@mpalpha mpalpha force-pushed the add-current-file-name-to-error-message branch from f99e232 to 55871ed Compare March 21, 2019 15:57
@mpalpha
Copy link
Contributor Author

mpalpha commented Mar 25, 2019

Error: The partial menu could not be found

to

Error: index.hbs: The partial menu could not be found

@ismay
Copy link
Contributor

ismay commented Apr 6, 2019

@mpalpha I had some time to look at this, and it looks good. However, I'd like to add tests to make sure it works as expected. However getTransformer would need to be mocked for that. Not that much trouble, but that will take a bit more time than I have at the moment. I'll revisit this asap and add some tests, and then we should be able to merge this and the related layouts PR.

@ismay ismay merged commit 8d9c102 into metalsmith:master Apr 7, 2019
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