yeojz / metalsmith-react-templates

A metalsmith plugin to render files using React / Preact / JSX based templates.
MIT License
92 stars 17 forks source link

Return whole error object in done callback #46

Closed jonathanglasmeyer closed 7 years ago

jonathanglasmeyer commented 7 years ago

The stack trace on render errors gets lost when you only return the error.message.. This makes it hard to debug errors that occur during rendering.

What do you think?

yeojz commented 7 years ago

@jonathanewerner Thanks. Makes sense. This fixes a potential issue as well when err is not an object but done is provided.

Thanks. 👍