File tree 1 file changed +18
-16
lines changed
1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -489,23 +489,25 @@ function setupChild(evalScript) {
489
489
}
490
490
debug ( `[${ threadId } ] fatal exception caught = ${ caught } ` ) ;
491
491
492
- if ( ! caught ) {
493
- let serialized ;
494
- try {
495
- serialized = serializeError ( error ) ;
496
- } catch { }
497
- debug ( `[${ threadId } ] fatal exception serialized = ${ ! ! serialized } ` ) ;
498
- if ( serialized )
499
- port . postMessage ( {
500
- type : messageTypes . ERROR_MESSAGE ,
501
- error : serialized
502
- } ) ;
503
- else
504
- port . postMessage ( { type : messageTypes . COULD_NOT_SERIALIZE_ERROR } ) ;
505
- clearAsyncIdStack ( ) ;
506
-
507
- process . exit ( ) ;
492
+ if ( caught ) {
493
+ return true ;
508
494
}
495
+
496
+ let serialized ;
497
+ try {
498
+ serialized = serializeError ( error ) ;
499
+ } catch { }
500
+ debug ( `[${ threadId } ] fatal exception serialized = ${ ! ! serialized } ` ) ;
501
+ if ( serialized )
502
+ port . postMessage ( {
503
+ type : messageTypes . ERROR_MESSAGE ,
504
+ error : serialized
505
+ } ) ;
506
+ else
507
+ port . postMessage ( { type : messageTypes . COULD_NOT_SERIALIZE_ERROR } ) ;
508
+ clearAsyncIdStack ( ) ;
509
+
510
+ process . exit ( ) ;
509
511
}
510
512
}
511
513
You can’t perform that action at this time.
0 commit comments