From 0804ec4cfefefab3dd45d05eab671999ae345ea1 Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Sat, 27 Dec 2025 17:52:40 +0100 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel --- doc/api/readline.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/readline.md b/doc/api/readline.md index 580872b9824..02e56e4c6a3 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -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'` + + + +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'`