From 2a2fae10a77a39632e74c7175a30b264c38ed0cb Mon Sep 17 00:00:00 2001 From: Joch2520 <20432565+Joch2520@users.noreply.github.com> Date: Sat, 13 Mar 2021 01:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E5=85=89catch=E8=80=8C?= =?UTF-8?q?=E6=9C=AA=E4=B8=8A=E6=8A=9B=E4=B9=9F=E6=9C=AA=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=A4=84=E7=90=86=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=20infnan#16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/transport/processors/Discord.js | 2 +- plugins/transport/processors/QQ.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/transport/processors/Discord.js b/plugins/transport/processors/Discord.js index c628d53..16eee10 100644 --- a/plugins/transport/processors/Discord.js +++ b/plugins/transport/processors/Discord.js @@ -157,7 +157,7 @@ const init = (b, h, c) => { if (userInfo.has(at)) { promises.push(Promise.resolve(userInfo.get(at))); } else { - promises.push(discordHandler.fetchUser(at).catch(_ => {})); + promises.push(discordHandler.fetchUser(at).catch(e => winston.error(e.stack))); } } diff --git a/plugins/transport/processors/QQ.js b/plugins/transport/processors/QQ.js index d54c442..0cf165c 100644 --- a/plugins/transport/processors/QQ.js +++ b/plugins/transport/processors/QQ.js @@ -130,7 +130,7 @@ const init = (b, h, c) => { if (groupInfo.has(`${at}@${context.to}`)) { promises.push(Promise.resolve(groupInfo.get(`${at}@${context.to}`))); } else { - promises.push(qqHandler.groupMemberInfo(context.to, at).catch(_ => {})); + promises.push(qqHandler.groupMemberInfo(context.to, at).catch(e => winston.error(e.stack))); } } @@ -151,7 +151,7 @@ const init = (b, h, c) => { context.text = context.text.replace(searchReg, atText); } } - }).catch(_ => {}).then(() => send()); + }).catch(e => winston.error(e.stack)).then(() => send()); } else { send(); }