Deraen / sass4clj

SASS compiler for Clj, Lein and Boot, using Libsass Java wrapper
70 stars 16 forks source link

In `api/build`, return status or throw when errors are encountered. #28

Closed orestis closed 3 years ago

orestis commented 5 years ago

Hi, thanks for maintaining this -- it's been very helpful to provide a smooth development experience!

I was wondering if you would considering returning a status report when errors are encountered. I'm calling sass4clj.api/build, and it swallows any exceptions thrown during the compilation. I'd like to plug in my own error reporting.

I'm working around this by using with-out-str and parsing the resulting text but surely that's a hack :)

I'm happy to submit a PR for this.

Deraen commented 3 years ago

At least partially solved by https://github.com/Deraen/sass4clj/commit/000cd218841ebf6c84be35aeb8de471617146102

Deraen commented 3 years ago

Now sass4clj.api/build should throw exceptions for errors. Warnings aren't handled by sass4clj, but are directly outputted to stdout by libsass/jsass.