Skip to content
Open
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
13 changes: 13 additions & 0 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ 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 `readline` `Interface`.

The listener function is called with an Error object passed as the single argument.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The listener function is called with an Error object passed as the single argument.
The listener function is called with an `Error` object passed as the single argument.


If no `'error'` event handler is attached to the `InterfaceConstructor` instance,
errors will be thrown as unhandled error events, which may crash the process.

Comment on lines +115 to +117
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If no `'error'` event handler is attached to the `InterfaceConstructor` instance,
errors will be thrown as unhandled error events, which may crash the process.

This is standard behavior.

### Event: `'line'`

<!-- YAML
Expand Down
Loading