mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05: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:
1 parent
c67cb727cb
commit
39ddd8522e
1 file changed
+1
-1
@@ -1713,7 +1713,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.
|
||||
|
||||
Reference in new issue
Block a user