Skip to content

Commit

Permalink
fix: forward errors upwards so that they can be caught
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarpl committed Jul 21, 2022
1 parent 9a36299 commit 75685ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.config.js
@@ -1,7 +1,7 @@
module.exports = {
globals: {
'ts-jest': {
tsConfig: 'tsconfig.json',
tsconfig: 'tsconfig.json',
diagnostics: {
ignoreCodes: ['TS2571']
}
Expand Down
1 change: 1 addition & 0 deletions src/parent-process/manager.ts
Expand Up @@ -705,6 +705,7 @@ export class ThreadedClassManagerClassInternal extends EventEmitter {
}
})
child.process.on('error', (err) => {
this.emit('error', child, err)
this.consoleError('Error from child ' + child.id, err)
})
child.process.on('message', (message: Message.From.Any) => {
Expand Down

0 comments on commit 75685ae

Please sign in to comment.