错误代码门户
Node.jsNode.js错误代码

ERR_AMBIGUOUS_ARGUMENT

ambiguous argument

代码 ERR_AMBIGUOUS_ARGUMENT · Node.js 报告的问题。

函数参数的使用方式表明函数签名可能会被误解。当assert.throws(block, message)中的message参数与block抛出的错误消息匹配时,node:assert模块会抛出这个错误,因为这种用法表明用户认为message是预期的消息,而不是如果block不抛出则AssertionError将显示的消息。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

A function argument is being used in a way that suggests that the function signature may be misunderstood. This is thrown by the node:assert module when the message parameter in assert.throws(block, message) matches the error message thrown by block because that usage suggests that the user believes message is the expected message rather than the message the AssertionError will display if block does not throw.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。