Skip to content

Commit 0804ec4

Browse files
authored
doc: document error event on readline InterfaceConstructor
Aims to document the error event introduced by cb3020d in v16.0.0. Fixes: #58289 PR-URL: #61170 Fixes: #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>
1 parent ed47077 commit 0804ec4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/api/readline.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ The listener function is called without passing any arguments.
102102
The `InterfaceConstructor` instance is finished once the `'close'` event is
103103
emitted.
104104

105+
### Event: `'error'`
106+
107+
<!-- YAML
108+
added: v16.0.0
109+
-->
110+
111+
The `'error'` event is emitted when an error occurs on the `input` stream
112+
associated with the `node:readline` `Interface`.
113+
114+
The listener function is called with an `Error` object passed as the single argument.
115+
105116
### Event: `'line'`
106117

107118
<!-- YAML

0 commit comments

Comments
 (0)