Commit 7added3b authored by Evan Lucas's avatar Evan Lucas Committed by Rod Vagg
Browse files

fs: pass err to callback if buffer is too big

In fs.readFile, if an encoding is specified and toString fails, do not
throw an error. Instead, pass the error to the callback.

Fixes: https://github.com/nodejs/node/issues/2767
PR-URL: https://github.com/nodejs/node/pull/3485


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent 1a41feb5
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