Commit b546a2b
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: #34022
Fixes: #33930
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>1 parent 7816e5f commit b546a2bCopy full SHA for b546a2b
File tree
Expand file treeCollapse file tree
1 file changed
+4
-1
lines changedOpen diff view settings
Filter options
- lib/internal
Expand file treeCollapse file tree
1 file changed
+4
-1
lines changedOpen diff view settings
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1253 | 1253 | |
1254 | 1254 | |
1255 | 1255 | |
1256 | | - |
| 1256 | + |
| 1257 | + |
| 1258 | + |
| 1259 | + |
1257 | 1260 | |
1258 | 1261 | |
1259 | 1262 | |
|
0 commit comments