voorhoede / fastatic

Speed up your static site with one command
MIT License
21 stars 3 forks source link

refactor(parse-all): report error per parser #75

Closed petergoes closed 8 years ago

petergoes commented 8 years ago

When a parser errors, report what happend to the user. Continue with all parsers before exiting. Parsers are started in paralell, we need to wait for all of them to complete to clean up the temp folder.

petergoes commented 8 years ago

70

jpsc commented 8 years ago

Looks good to me :)

jbmoelker commented 8 years ago

as discussed:

jbmoelker commented 8 years ago

@petergoes I propose we revisit this one after you've updated the new stats parser. I think the signature of the main index.js will have to change to return those stats.

petergoes commented 8 years ago

the last commit builds on top of #94

petergoes commented 8 years ago

I just realised, by handeling error reporting I do in the last commit, the module is never going to exit with an exit code. Any error in the parsers is caught, so the catch wil execute, hence, consuming modules will always have to actively check the output to see if there are errors and can't rely on their own catch implementation.

Maybe it's worth to discuss this in person?

petergoes commented 8 years ago

Closing this PR and putting the error reporting in another branch based on #94