doc: document error event on readline InterfaceConstructor

Aims to document the error event introduced by cb3020d in v16.0.0.

Fixes: https://github.com/nodejs/node/issues/58289
PR-URL: https://github.com/nodejs/node/pull/61170
Fixes: https://github.com/nodejs/node/issues/61037
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Xavier Stouder
2025-12-27 17:52:40 +01:00
committed by GitHub
parent ed47077736
commit 0804ec4cfe

View File

@@ -102,6 +102,17 @@ The listener function is called without passing any arguments.
The `InterfaceConstructor` instance is finished once the `'close'` event is
emitted.
### Event: `'error'`
<!-- YAML
added: v16.0.0
-->
The `'error'` event is emitted when an error occurs on the `input` stream
associated with the `node:readline` `Interface`.
The listener function is called with an `Error` object passed as the single argument.
### Event: `'line'`
<!-- YAML