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.
Fixes: https://github.com/nodejs/node/issues/30831
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines