diff options
author | Sakthipriyan Vairamani (thefourtheye) <thechargingvolcano@gmail.com> | 2017-04-21 10:16:15 +0530 |
---|---|---|
committer | Sakthipriyan Vairamani (thefourtheye) <thechargingvolcano@gmail.com> | 2017-05-10 00:04:01 +0530 |
commit | 4cb5f3daa350421e4eb4622dc818633d3a0659b3 (patch) | |
tree | 490ce4076130828921ddb6a7bfd45e49039d17de /test/fixtures/test-fs-readfile-error.js | |
parent | e429f9a42af94f039621a1bf9f21ad424aa00558 (diff) | |
download | android-node-v8-4cb5f3daa350421e4eb4622dc818633d3a0659b3.tar.gz android-node-v8-4cb5f3daa350421e4eb4622dc818633d3a0659b3.tar.bz2 android-node-v8-4cb5f3daa350421e4eb4622dc818633d3a0659b3.zip |
fs: throw on invalid callbacks for async functions
If an asynchronous function is passed no callback function, there is no
way to return the result. This patch throws an error if the callback
passed is not valid or none passed at all.
PR-URL: https://github.com/nodejs/node/pull/12562
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/fixtures/test-fs-readfile-error.js')
-rw-r--r-- | test/fixtures/test-fs-readfile-error.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/fixtures/test-fs-readfile-error.js b/test/fixtures/test-fs-readfile-error.js index 3f8d9a731e..9bac28f8ef 100644 --- a/test/fixtures/test-fs-readfile-error.js +++ b/test/fixtures/test-fs-readfile-error.js @@ -19,4 +19,4 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -require('fs').readFile('/'); // throws EISDIR +require('fs').readFileSync('/'); // throws EISDIR |