better error messaging when js fails to compile when reloading

This commit is contained in:
Julian Lam
2014-08-26 15:31:27 -04:00
parent e497290dbc
commit 2d9ca83ae0
4 changed files with 7 additions and 7 deletions

View File

@@ -38,11 +38,9 @@ var async = require('async'),
], function(err) {
if (!err) {
emitter.emit('nodebb:ready');
callback.apply(null, arguments);
} else {
console.log('failed!');
emitter.emit('nodebb:reload.failed');
}
callback.apply(null, arguments);
});
});
};

View File

@@ -166,7 +166,7 @@ module.exports = function(Meta) {
winston.error('[meta/js] Could not compile client-side scripts! ' + message.payload.message);
minifier.kill();
if (typeof callback === 'function') {
callback(err);
callback(new Error(message.payload.message));
} else {
process.exit(0);
}