-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
errors, child_process: migrate to using internal/errors #11300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,17 +91,32 @@ E('ERR_INVALID_ARG_TYPE', invalidArgType); | |
| E('ERR_INVALID_CALLBACK', 'callback must be a function'); | ||
| E('ERR_INVALID_FILE_URL_HOST', 'File URL host %s'); | ||
| E('ERR_INVALID_FILE_URL_PATH', 'File URL path %s'); | ||
| E('ERR_INVALID_HANDLE_TYPE', 'This handle type cannot be sent'); | ||
| E('ERR_INVALID_OPT_VALUE', | ||
| (name, value) => { | ||
| return `The value "${String(value)}" is invalid for option "${name}"`; | ||
| }); | ||
| E('ERR_INVALID_SYNC_FORK_INPUT', | ||
| (value) => { | ||
| return 'Asynchronous forks do not support Buffer, Uint8Array or string' + | ||
| `input: ${value}`; | ||
| }); | ||
| E('ERR_INVALID_THIS', 'Value of "this" must be of type %s'); | ||
| E('ERR_INVALID_TUPLE', '%s must be an iterable %s tuple'); | ||
| E('ERR_INVALID_URL', 'Invalid URL: %s'); | ||
| E('ERR_INVALID_URL_SCHEME', | ||
| (expected) => `The URL must be ${oneOf(expected, 'scheme')}`); | ||
| E('ERR_IPC_CHANNEL_CLOSED', 'channel closed'); | ||
| E('ERR_IPC_DISCONNECTED', 'IPC channel is already disconnected'); | ||
| E('ERR_IPC_ONE_PIPE', 'Child process can have only one IPC pipe'); | ||
| E('ERR_IPC_SYNC_FORK', 'IPC cannot be used with synchronous forks'); | ||
| E('ERR_MISSING_ARGS', missingArgs); | ||
| E('ERR_STDERR_CLOSE', 'process.stderr cannot be closed'); | ||
| E('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed'); | ||
| E('ERR_UNKNOWN_BUILTIN_MODULE', (id) => `No such built-in module: ${id}`); | ||
| E('ERR_UNKNOWN_SIGNAL', (signal) => `Unknown signal: ${signal}`); | ||
| E('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type'); | ||
| E('ERR_UNKNOWN_STREAM_TYPE', 'Unknown stream file type'); | ||
| E('ERR_UNKNOWN_BUILTIN_MODULE', (id) => `No such built-in module: ${id}`); | ||
| // Add new errors from here... | ||
|
|
||
| function invalidArgType(name, expected, actual) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I read it correctly, this would print
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto.
ERR_IPC_INVALID_HANDLE_TYPE