mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 23:30:36 +01:00
better error messaging when js fails to compile when reloading
This commit is contained in:
@@ -75,5 +75,7 @@
|
||||
|
||||
"cant-chat-with-yourself": "You can't chat with yourself!",
|
||||
|
||||
"not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post"
|
||||
"not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post",
|
||||
|
||||
"reload-failed": "NodeBB encountered a problem while reloading: \"%1\". NodeBB will continue to serve the existing client-side assets, although you should undo what you did just prior to reloading."
|
||||
}
|
||||
@@ -85,7 +85,7 @@ define('forum/admin/index', function() {
|
||||
alert_id: 'instance_reload',
|
||||
type: 'danger',
|
||||
title: '[[global:alert.error]]',
|
||||
message: err.message
|
||||
message: '[[error:reload-failed, ' + err.message + ']]'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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