Skip to content

Commit

Permalink
doc: fix uncaught exception example
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielschulhof committed Feb 1, 2024
1 parent 68885d5 commit e277342
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ exit with 0.

```mjs
import process from 'node:process';
import fs from 'node:fs';

process.on('uncaughtException', (err, origin) => {
fs.writeSync(
Expand All @@ -380,6 +381,7 @@ console.log('This will not run.');

```cjs
const process = require('node:process');
const fs = require('node:fs');

process.on('uncaughtException', (err, origin) => {
fs.writeSync(
Expand Down

0 comments on commit e277342

Please sign in to comment.