sindresorhus / grunt-sass

Compile Sass to CSS
MIT License
1.01k stars 209 forks source link

user-emitted errors do not have the formatted property. #262

Closed koenpunt closed 8 years ago

koenpunt commented 8 years ago

user-emitted errors (e.g. from importer functions) do not have the formatted property.

With the previous implementation (custom formatter) this even resulted in a fatal error due to the file property being non-existent

Fatal error: Arguments to path.resolve must be strings
sindresorhus commented 8 years ago

That should IMHO be handled by node-sass. Every implementor shouldn't have to workaround this. err.formatted should be guaranteed by the implementation regardless of where it's coming from.

koenpunt commented 8 years ago

IMHO I think node-sass would've been better with a utility method for error formatting instead of a non-standard property on a standard Error, but that's another discussion.

sindresorhus commented 8 years ago

// @xzyfer

sindresorhus commented 8 years ago

Closing as I feel this should be fixed in node-sass instead as that would benefit all consumers. Open an issue over there.

xzyfer commented 8 years ago

Tracking this in LibSass https://github.com/sass/libsass/issues/1807.

It's likely we'll patch this in node-sass in the interim since LibSass releases can take a while.

koenpunt commented 8 years ago

Thanks for getting back at this @xzyfer