From 9f6c05bb24e13ee41f2729ace3891144b962bf31 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 15 Jul 2014 16:32:51 -0400 Subject: [PATCH] closes #1830 --- src/meta/css.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/meta/css.js b/src/meta/css.js index db70c6c00e..a62b4aa1ef 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -50,13 +50,19 @@ module.exports = function(Meta) { parser.parse(source, function(err, tree) { if (err) { - winston.error('[meta/css] Could not minify LESS/CSS: ' + err.stack); + winston.error('[meta/css] Could not minify LESS/CSS: ' + err.message); return; } - var css = tree.toCSS({ - cleancss: true - }); + try { + var css = tree.toCSS({ + cleancss: true + }); + } catch (err) { + winston.error('[meta/css] Syntax Error: ' + err.message + ' - ' + path.basename(err.filename) + ' on line ' + err.line); + return; + } + Meta.css.cache = css;