Skip to content

Commit

Permalink
清理光catch而未上抛也未进行任何处理的代码 infnan#16
Browse files Browse the repository at this point in the history
  • Loading branch information
Zokhoi committed Mar 12, 2021
1 parent 9b77e0c commit 2a2fae1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/transport/processors/Discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/transport/processors/QQ.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
}

Expand All @@ -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();
}
Expand Down

0 comments on commit 2a2fae1

Please sign in to comment.