This commit is contained in:
Suwings 2020-03-04 18:28:31 +08:00
parent dc44d50fda
commit 0a2a6588da
2 changed files with 9 additions and 1 deletions

5
app.js
View File

@ -192,6 +192,11 @@ process.on("uncaughtException", function (err) {
MCSERVER.error('错误报告:', err);
});
process.on('unhandledRejection', (reason, p) => {
MCSERVER.infoLog('错误报告:');
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
//初始化目录结构环境
(function initializationRun() {
const USERS_PATH = './users/';

View File

@ -272,7 +272,10 @@ class ServerProcess extends EventEmitter {
if (this.dataModel.dockerConfig.isDocker) {
// Docker 启动
// 选用虚拟化技术启动后,将不再执行下面代码逻辑,由专属的进程启动方式启动。
this.dockerStart();
this.dockerStart().catch((err) => {
this.printlnCommandLine("进程实例启动时失败,建议检查配置文件与启动参数");
this.stop();
});
// 阻止继续运行下去
return true;
} else {