【发布时间】:2018-11-23 21:52:13
【问题描述】:
如何使用文件名和行记录错误?
使用节点 11.2.0
(node:208) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user
at item.request.gen.end (/rbd/pnpm-volume/09ff3c4a-1318-4254-9aec-024d6a83c316/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:15)
at then (/rbd/pnpm-volume/09ff3c4a-1318-4254-9aec-024d6a83c316/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21
at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:208) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was not
handled with .catch(). (rejection id: 478)
【问题讨论】:
-
internal/process/next_tick.js:77:7你在这个文件的第 77 行查看了吗? 7是线上的位置 -
我从未访问过该文件,而且我很确定我以前从未见过它。
标签: javascript node.js discord.js