Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
jonasgeiler committed Oct 17, 2025
commit d738b79026ce6991a9d91292d962d0ddb4a4764c
2 changes: 1 addition & 1 deletion doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading