mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
doc: use any for worker_threads.Worker 'error' event argument err
A worker thread can throw anything via the `throw` keyword, which gets passed directly to 'error' event listeners. The event listener should not assume it is an `Error` object. PR-URL: https://github.com/nodejs/node/pull/60300 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
f25cce2805
commit
9fbf0cbc60
|
|
@ -1717,7 +1717,7 @@ changes:
|
|||
added: v10.5.0
|
||||
-->
|
||||
|
||||
* `err` {Error}
|
||||
* `err` {any}
|
||||
|
||||
The `'error'` event is emitted if the worker thread throws an uncaught
|
||||
exception. In that case, the worker is terminated.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user