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

Handle errors thrown from functions #5

Open
Ajedi32 opened this issue Apr 24, 2016 · 1 comment
Open

Handle errors thrown from functions #5

Ajedi32 opened this issue Apr 24, 2016 · 1 comment

Comments

@Ajedi32
Copy link

Ajedi32 commented Apr 24, 2016

Currently if a function throws an error each doesn't pass it on to metalsmith, but instead lets it bubble up to the top-level scope. Metalsmith each should instead catch the errors and forward them to Metalsmith via the done() callback.

@wilsaj
Copy link
Owner

wilsaj commented Apr 28, 2016

I like the idea.

Thoughts on whether it should it just exit early, calling done() with the first error encountered, or instead collect all the errors and forward an array of all of them at the end?

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

No branches or pull requests

2 participants