We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8f6b38 commit a132c6dCopy full SHA for a132c6d
lib/internal/process/report.js
@@ -1,6 +1,5 @@
1
'use strict';
2
const {
3
- ERR_INVALID_ARG_TYPE,
4
ERR_SYNTHETIC
5
} = require('internal/errors').codes;
6
@@ -18,8 +17,8 @@ const report = {
18
17
if (typeof file === 'object' && file !== null) {
19
err = file;
20
file = undefined;
21
- } else if (file !== undefined && typeof file !== 'string') {
22
- throw new ERR_INVALID_ARG_TYPE('file', 'String', file);
+ } else if (file !== undefined) {
+ validateString(file, 'file');
23
} else if (err === undefined) {
24
err = new ERR_SYNTHETIC();
25
} else {
0 commit comments