doc: clarify ERR_AMBIGUOUS_ARGUMENT

PR-URL: https://github.com/nodejs/node/pull/22542
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rich Trott 2018-08-26 18:20:05 -07:00
parent da8641f3b4
commit d8855e4476

View File

@ -581,10 +581,12 @@ found [here][online].
<a id="ERR_AMBIGUOUS_ARGUMENT"></a> <a id="ERR_AMBIGUOUS_ARGUMENT"></a>
### ERR_AMBIGUOUS_ARGUMENT ### ERR_AMBIGUOUS_ARGUMENT
This is triggered by the `assert` module in case e.g., A function argument is being used in a way that suggests that the function
`assert.throws(fn, message)` is used in a way that the message is the thrown signature may be misunderstood. This is thrown by the `assert` module when the
error message. This is ambiguous because the message is not verifying the error `message` parameter in `assert.throws(block, message)` matches the error message
message and will only be thrown in case no error is thrown. 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.
<a id="ERR_ARG_NOT_ITERABLE"></a> <a id="ERR_ARG_NOT_ITERABLE"></a>
### ERR_ARG_NOT_ITERABLE ### ERR_ARG_NOT_ITERABLE