creationix / haml-js

Haml ported to server-side Javascript. This is a traditional server-side templating language. Tested with node-js
MIT License
901 stars 110 forks source link

Error behavior inconsistent #89

Closed StoneCypher closed 8 years ago

StoneCypher commented 9 years ago

The error behavior in #74 and #88 seems to be inconsistent. In the former case, the haml tool fails in a way that the gulp wrapper aborts, which is the appropriate behavior. In the latter case, however, a large HTML error message is written to file, and the task appears to succeed.

mavericreal commented 9 years ago

+1.

The execute function needs a more advanced error handling: https://github.com/creationix/haml-js/blob/master/lib/haml.js#L650

It would be useful to have 2 options in the case of an error:

1) throw an error when it fails. or 2) ignore it but log it.

aaronblohowiak commented 8 years ago

Pull requests accepted to add the option.

StoneCypher commented 3 years ago

@seballot - since you just fixed #88, could you look at this too?