File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -360,12 +360,13 @@ exit with 0.
360360
361361``` mjs
362362import process from ' node:process' ;
363+ import fs from ' node:fs' ;
363364
364365process .on (' uncaughtException' , (err , origin ) => {
365366 fs .writeSync (
366367 process .stderr .fd ,
367368 ` Caught exception: ${ err} \n ` +
368- ` Exception origin: ${ origin} ` ,
369+ ` Exception origin: ${ origin} \n ` ,
369370 );
370371});
371372
@@ -380,12 +381,13 @@ console.log('This will not run.');
380381
381382``` cjs
382383const process = require (' node:process' );
384+ const fs = require (' node:fs' );
383385
384386process .on (' uncaughtException' , (err , origin ) => {
385387 fs .writeSync (
386388 process .stderr .fd ,
387389 ` Caught exception: ${ err} \n ` +
388- ` Exception origin: ${ origin} ` ,
390+ ` Exception origin: ${ origin} \n ` ,
389391 );
390392});
391393
You can’t perform that action at this time.
0 commit comments