Commit cb3020d8 authored by rexagod's avatar rexagod Committed by Node.js GitHub Bot
Browse files

lib: add error handling for input stream

This adds support for error handling in readline.createInterface()
for cases where the input object is not supplied, the input stream
is invalid, or the underlying buffer emits an error.

Now, the 'error' emissions by the readline module are thrown but
in order to log those in the specific case of await for loops,
we still need to fix silent rejections (TODO added there) inside
async iterators for the thenables to work.

Fixes: https://github.com/nodejs/node/issues/30831

PR-URL: https://github.com/nodejs/node/pull/31603


Reviewed-By: default avatarRobert Nagy <ronagy@icloud.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAntoine du Hamel <duhamelantoine1995@gmail.com>
parent e40ed285
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment