GeezerVison is showing github.com — console: fixup error message · nodejs/node@814d88a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/internal/console/constructor.js +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -110,11 +110,14 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) { |
110 | 110 | if (inspectOptions.colors !== undefined && |
111 | 111 | options.colorMode !== undefined) { |
112 | 112 | throw new ERR_INCOMPATIBLE_OPTION_PAIR( |
113 | | - 'inspectOptions.color', 'colorMode'); |
| 113 | + 'options.inspectOptions.color', 'colorMode'); |
114 | 114 | } |
115 | 115 | optionsMap.set(this, inspectOptions); |
116 | 116 | } else if (inspectOptions !== undefined) { |
117 | | - throw new ERR_INVALID_ARG_TYPE('inspectOptions', 'object', inspectOptions); |
| 117 | + throw new ERR_INVALID_ARG_TYPE( |
| 118 | + 'options.inspectOptions', |
| 119 | + 'object', |
| 120 | + inspectOptions); |
118 | 121 | } |
119 | 122 |
|
120 | 123 | // Bind the prototype functions to this Console instance |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-console-instance.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -140,7 +140,7 @@ out.write = err.write = (d) => {}; |
140 | 140 | }); |
141 | 141 | }, |
142 | 142 | { |
143 | | - message: 'The "inspectOptions" argument must be of type object.' + |
| 143 | + message: 'The "options.inspectOptions" property must be of type object.' + |
144 | 144 | common.invalidArgTypeHelper(inspectOptions), |
145 | 145 | code: 'ERR_INVALID_ARG_TYPE' |
146 | 146 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-console-tty-colors.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -86,7 +86,7 @@ check(false, false, false); |
86 | 86 | }); |
87 | 87 | }, |
88 | 88 | { |
89 | | - message: 'Option "inspectOptions.color" cannot be used in ' + |
| 89 | + message: 'Option "options.inspectOptions.color" cannot be used in ' + |
90 | 90 | 'combination with option "colorMode"', |
91 | 91 | code: 'ERR_INCOMPATIBLE_OPTION_PAIR' |
92 | 92 | } |
|