This website works better with JavaScript.
Home
Explore
Help
Sign In
lukechilds
/
node
mirror of
https://github.com/lukechilds/node.git
Watch
1
Star
0
Fork
0
Code
Issues
Projects
Releases
Wiki
Activity
16503
Commits
131
Branches
446
Tags
325 MiB
Tree:
88c3f57cc3
node
/
test
/
fixtures
/
test-fs-readfile-error.js
2 lines
47 B
Raw
Normal View
History
Revert "fs: make callback mandatory to all async functions" This reverts commit 9359de9dd2eae06ed5afcb75dad9bd4c466eb69d. Original Commit Message: The "fs" module has two functions called `maybeCallback` and `makeCallback`, as of now. The `maybeCallback` creates a default function to report errors, if the parameter passed is not a function object. Basically, if the callback is omitted in some cases, this function is used to create a default callback function. The `makeCallback`, OTOH, creates a default function only if the parameter passed is `undefined`, and if it is not a function object it will throw an `Error`. This patch removes the `maybeCallback` function and makes the callback function argument mandatory for all the async functions. PR-URL: https://github.com/nodejs/node/pull/7168 Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/nodejs/node/pull/7846 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
9 years ago
require
(
'fs'
)
.
readFile
(
'/'
)
;
// throws EISDIR