diff options
author | James M Snell <jasnell@gmail.com> | 2016-06-06 13:51:52 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-06-07 07:15:14 -0700 |
commit | c300ba22128ce8e675650adcd1f6b869dc1b5126 (patch) | |
tree | ee4a0002b9165f6698531f2260f29661c55dc390 /doc | |
parent | ed8b600b98e434dbe6d966df371dfde08016222f (diff) | |
download | android-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.tar.gz android-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.tar.bz2 android-node-v8-c300ba22128ce8e675650adcd1f6b869dc1b5126.zip |
doc: clarify rl.question callback args
Clarify that readline's rl.question() callback does not
use the err back pattern.
Fixes: https://github.com/nodejs/node/issues/4833
PR-URL: https://github.com/nodejs/node/pull/7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/readline.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index 9003d4d2eb..6ddbd1cdf6 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -262,6 +262,10 @@ rl.question('What is your favorite food?', (answer) => { }); ``` +*Note*: The `callback` function passed to `rl.question()` does not follow the +typical pattern of accepting an `Error` object or `null` as the first argument. +The `callback` is called with the provided answer as the only argument.git + ### rl.resume() <!-- YAML added: v0.3.4 |