Skip to content

Commit b4a17f0

Browse files
committed
Update changelog
1 parent cbed33f commit b4a17f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,30 @@ removed. The [`onError` option](README.md#onerror) can be used instead to
1111
customize how the errors are printed. It receives the original process error,
1212
with its `name` left unchanged.
1313

14+
Before:
15+
16+
```js
17+
logProcessErrors({
18+
log(error) {
19+
if (error.name === 'UncaughtException') {
20+
console.error(error)
21+
}
22+
},
23+
})
24+
```
25+
26+
After:
27+
28+
```js
29+
logProcessErrors({
30+
onError(error, reason) {
31+
if (reason === 'uncaughtException') {
32+
console.error(error)
33+
}
34+
},
35+
})
36+
```
37+
1438
## Filtering
1539

1640
The `levels` option was removed. As a consequence, the arguments of the

0 commit comments

Comments
 (0)