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@7908415

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
@@ -104,11 +104,14 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
104104
if (inspectOptions.colors !== undefined &&
105105
options.colorMode !== undefined) {
106106
throw new ERR_INCOMPATIBLE_OPTION_PAIR(
107-
'inspectOptions.color', 'colorMode');
107+
'options.inspectOptions.color', 'colorMode');
108108
}
109109
optionsMap.set(this, inspectOptions);
110110
} else if (inspectOptions !== undefined) {
111-
throw new ERR_INVALID_ARG_TYPE('inspectOptions', 'object', inspectOptions);
111+
throw new ERR_INVALID_ARG_TYPE(
112+
'options.inspectOptions',
113+
'object',
114+
inspectOptions);
112115
}
113116

114117
// 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.