diff --git a/docs/assets/js/src/customizer.js b/docs/assets/js/src/customizer.js
index c75681cdd5..59d57f82a1 100644
--- a/docs/assets/js/src/customizer.js
+++ b/docs/assets/js/src/customizer.js
@@ -24,7 +24,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
'
' +
'
×' +
'
Warning:' + msg + '
' +
- (err.extract ? '' : '') +
+ (err.message ? $('
').text('Error: ' + err.message)[0].outerHTML : '') +
+ (err.extract ? $('').text(err.extract.join('\n'))[0].outerHTML : '') +
'
' +
'').appendTo('body').alert()
throw err
@@ -38,7 +39,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
function showCallout(msg, showUpTop) {
var callout = $('' +
- '
Attention!
' +
+ '
Attention!
' +
'
' + msg + '
' +
'
')
@@ -258,12 +259,17 @@ window.onload = function () { // wait for load in a dumb way because B-0
filename: baseFilename + '.css'
})
- parser.parse(lessSource, function (err, tree) {
- if (err) {
- return promise.reject(err)
+ parser.parse(lessSource, function (parseErr, tree) {
+ if (parseErr) {
+ return promise.reject(parseErr)
+ }
+ try {
+ intoResult[baseFilename + '.css'] = cw + tree.toCSS()
+ intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
+ }
+ catch (compileErr) {
+ return promise.reject(compileErr)
}
- intoResult[baseFilename + '.css'] = cw + tree.toCSS()
- intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
promise.resolve()
})
@@ -306,7 +312,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
promise.resolve(result)
}).fail(function (err) {
- showError('Ruh roh! Could not parse less files.', err)
+ showError('Ruh roh! Problem parsing or compiling Less files.', err)
promise.reject()
})