-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
- Version: all?
- Platform: all?
- Subsystem: child_process, process
parent.js:
'use strict';
const subprocess = require('child_process').fork('subprocess.js');
try {
subprocess.send(Symbol());
} catch (err) {
console.error('PARENT error:', err);
}subprocess.js:
'use strict';
process.on('uncaughtException', (err) => {
console.log('SUBPROCESS error:', err);
});
process.on('message', (msg) => {
console.log('SUBPROCESS got message:', msg);
});Output:
SUBPROCESS error: SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Pipe.channel.onread (internal/child_process.js:492:28)- Should we intercept unserializable values at the sending side?
- If not, should we make the error message on receiving side more clear?
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.