punch icon indicating copy to clipboard operation
punch copied to clipboard

Punch could catch LESS parsing errors

Open smola opened this issue 11 years ago • 3 comments

When running punch s it is sometimes annoying that it fully crashes when less parser throws an error. Punch could handle this so that an error page is returned.

smola avatar Aug 03 '13 19:08 smola

I guess this is because you're using an old version of the Less npm module. From 1.4.1, Less module passes the error to callback, instead of raising the exception.

Also, try upgrading to latest Punch (0.5.37 or above), which should log Less parsing errors more descriptively.

laktek avatar Sep 14 '13 07:09 laktek

I have upgraded to Punch 0.5.37 and Less 1.4.2 and it still fails silently. The generated CSS file is empty and punch s just returns status 200.

The project where I've got this problem is here: https://github.com/smola/smola.github.io/tree/punch

smola avatar Sep 17 '13 22:09 smola

@laktek I think @smola is describing something like an in browser error page when parsing errors occur versus just logging to the console when template or css errors occur.

For example, here is an error page from the better_errors gem: image

bjfish avatar Oct 17 '13 18:10 bjfish