日志:数据库catch

This commit is contained in:
luying
2021-07-19 14:41:01 +08:00
parent 7c735bfbfc
commit 4728d4836b
5 changed files with 71 additions and 9 deletions
+1 -5
View File
@@ -152,11 +152,7 @@ app.configure(ALL_ENVS, 'systimer', function () {
function errorHandler(err: Error, msg: any, resp: any,
session: FrontendOrBackendSession, cb: HandlerCallback) {
const errCode = genCode(10);
errlogger.debug(`${pinus.app.serverId} error handler`);
errlogger.debug(`msg[${JSON.stringify(msg)}]`);
errlogger.debug(`resp[${JSON.stringify(resp)}]`);
errlogger.debug(`sessionId:${JSON.stringify(session.export())}`);
errlogger.error(`error *${errCode}* stack: ${err.stack}`);
errlogger.error(`${pinus.app.serverId} error handler \n msg[${JSON.stringify(msg)}] \n resp[${JSON.stringify(resp)}] \n sessionId:${JSON.stringify(session.export())} \n error *${errCode}* stack: ${err.stack}`);
if (!resp) {
resp = resResult(STATUS.GLOBAL_ERR, { errCode });