From 87f8df23afbaeea9f2bf9b02121edc030b113154 Mon Sep 17 00:00:00 2001 From: Sandro Boehme Date: Sat, 5 Apr 2014 18:46:08 +0200 Subject: [PATCH] Throwing an error now on `writeError` if `silent`option is not set to give users of the API the possibility to distinguish between a successful compilation and an unsuccessful one without needing to parse the output. --- lib/less/rhino.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/less/rhino.js b/lib/less/rhino.js index 2e4f51c7..1b836afd 100644 --- a/lib/less/rhino.js +++ b/lib/less/rhino.js @@ -56,7 +56,8 @@ function formatError(ctx, options) { function writeError(ctx, options) { options = options || {}; if (options.silent) { return; } - print(formatError(ctx, options)); + var message = formatError(ctx, options); + throw new Error(message); } function loadStyleSheet(sheet, callback, reload, remaining) {