Skip to content

Commit fbc8b7b

Browse files
jonasgeileraduh95
authored andcommitted
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: #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>
1 parent 1769597 commit fbc8b7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/worker_threads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ changes:
17131713
added: v10.5.0
17141714
-->
17151715

1716-
* `err` {Error}
1716+
* `err` {any}
17171717

17181718
The `'error'` event is emitted if the worker thread throws an uncaught
17191719
exception. In that case, the worker is terminated.

0 commit comments

Comments
 (0)