GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — console: fixup error message · nodejs/node@814d88a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/console
    • constructor.js
  • test/parallel
    • test-console-instance.js
    • test-console-tty-colors.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/console/constructor.js‎

Copy file name to clipboardExpand all lines: lib/internal/console/constructor.js
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,14 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
110110
if (inspectOptions.colors !== undefined &&
111111
options.colorMode !== undefined) {
112112
throw new ERR_INCOMPATIBLE_OPTION_PAIR(
113-
'inspectOptions.color', 'colorMode');
113+
'options.inspectOptions.color', 'colorMode');
114114
}
115115
optionsMap.set(this, inspectOptions);
116116
} 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);
118121
}
119122

120123
// Bind the prototype functions to this Console instance
Collapse file

‎test/parallel/test-console-instance.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-console-instance.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ out.write = err.write = (d) => {};
140140
});
141141
},
142142
{
143-
message: 'The "inspectOptions" argument must be of type object.' +
143+
message: 'The "options.inspectOptions" property must be of type object.' +
144144
common.invalidArgTypeHelper(inspectOptions),
145145
code: 'ERR_INVALID_ARG_TYPE'
146146
}
Collapse file

‎test/parallel/test-console-tty-colors.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-console-tty-colors.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ check(false, false, false);
8686
});
8787
},
8888
{
89-
message: 'Option "inspectOptions.color" cannot be used in ' +
89+
message: 'Option "options.inspectOptions.color" cannot be used in ' +
9090
'combination with option "colorMode"',
9191
code: 'ERR_INCOMPATIBLE_OPTION_PAIR'
9292
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.