Skip to content

Commit 99e357a

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 4b23ac8 commit 99e357a

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
@@ -1717,7 +1717,7 @@ changes:
17171717
added: v10.5.0
17181718
-->
17191719

1720-
* `err` {Error}
1720+
* `err` {any}
17211721

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

0 commit comments

Comments
 (0)