Commit b546a2b4 authored by Denys Otrishko's avatar Denys Otrishko Committed by Rich Trott
Browse files

lib: handle one of args case in ERR_MISSING_ARGS

This makes ERR_MISSING_ARGS handle nested arrays in argument names as
one-of case and will print them as '"arg1" or "arg2" or "arg3"'.

Example:
```js
throw new ERR_MISSING_ARGS(['a', 'b', 'c']);
// will result in message:
// The "a" or "b" or "c" argument must be specified
```

PR-URL: https://github.com/nodejs/node/pull/34022
Fixes: https://github.com/nodejs/node/issues/33930


Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarZeyu Yang <himself65@outlook.com>
parent 7816e5f7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment