mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 11:27:01 +02:00
better error messaging when js fails to compile when reloading
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user