File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
packages/services/schema/src Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ export class CompositionScheduler {
102
102
} ) ;
103
103
} ;
104
104
105
+ // catch uncaught exception from worker thread. Worker thread gets terminated.
105
106
worker . on ( 'error' , error => {
106
- console . error ( error ) ;
107
107
this . logger . error ( 'Worker error %s' , error ) ;
108
108
Sentry . captureException ( error , {
109
109
extra : {
Original file line number Diff line number Diff line change @@ -22,21 +22,7 @@ export function createCompositionWorker(args: {
22
22
23
23
process . on ( 'unhandledRejection' , function ( err ) {
24
24
console . error ( 'unhandledRejection' , err ) ;
25
- console . error ( err ) ;
26
- args . port . postMessage ( {
27
- code : 'ERROR' ,
28
- err,
29
- } ) ;
30
- process . exit ( 1 ) ;
31
- } ) ;
32
-
33
- process . on ( 'uncaughtException' , function ( err ) {
34
- console . error ( 'uncaughtException' , err ) ;
35
- args . port . postMessage ( {
36
- code : 'ERROR' ,
37
- err,
38
- } ) ;
39
- process . exit ( 1 ) ;
25
+ throw err ;
40
26
} ) ;
41
27
42
28
args . port . on ( 'message' , async ( message : CompositionEvent ) => {
You can’t perform that action at this time.
0 commit comments