File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ The npm package size has been greatly reduced.
77## Pretty-printing
88
99Errors are not pretty-printed anymore. As a consequence, the ` colors ` option was
10- removed. The [ ` onError ` option] ( README.md#onerror ) can be used instead to
11- customize how the errors are printed. It receives the original process error,
12- with its ` name ` left unchanged.
10+ removed.
11+
12+ The [ ` onError ` option] ( README.md#onerror ) can be used instead to customize how
13+ the errors are printed. It receives the original process error. The process
14+ error event is now passed as a second argument instead of being set as
15+ ` error.name ` .
1316
1417Before:
1518
2730
2831``` js
2932logProcessErrors ({
30- onError (error , reason ) {
31- if (reason === ' uncaughtException' ) {
33+ onError (error , event ) {
34+ if (event === ' uncaughtException' ) {
3235 console .error (error)
3336 }
3437 },
You can’t perform that action at this time.
0 commit comments