summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-03-13 22:52:33 +0100
committerisaacs <i@izs.me>2013-03-13 15:34:18 -0700
commitfa05e8a2706e20a191942fe2b2273481605a1f14 (patch)
tree5997cd4c0819a168745fadab6743902d4e08d1ab /doc
parent7b7235a232439c4bb2038ed5fbbe63e3bffd8202 (diff)
downloadandroid-node-v8-fa05e8a2706e20a191942fe2b2273481605a1f14.tar.gz
android-node-v8-fa05e8a2706e20a191942fe2b2273481605a1f14.tar.bz2
android-node-v8-fa05e8a2706e20a191942fe2b2273481605a1f14.zip
doc: implicit fs callbacks don't throw in v0.10
But they will in v0.12. Re #5005.
Diffstat (limited to 'doc')
-rw-r--r--doc/api/fs.markdown23
1 files changed, 4 insertions, 19 deletions
diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown
index 29d3aa3339..e7a562d17a 100644
--- a/doc/api/fs.markdown
+++ b/doc/api/fs.markdown
@@ -63,26 +63,11 @@ Relative path to filename can be used, remember however that this path will be
relative to `process.cwd()`.
Most fs functions let you omit the callback argument. If you do, a default
-callback is used that rethrows errors. To get a trace to the original call
-site, set the NODE_DEBUG environment variable:
+callback is used that ignores errors, but prints a deprecation
+warning.
- $ cat script.js
- function bad() {
- require('fs').readFile('/');
- }
- bad();
-
- $ env NODE_DEBUG=fs node script.js
- fs.js:66
- throw err;
- ^
- Error: EISDIR, read
- at rethrow (fs.js:61:21)
- at maybeCallback (fs.js:79:42)
- at Object.fs.readFile (fs.js:153:18)
- at bad (/path/to/script.js:2:17)
- at Object.<anonymous> (/path/to/script.js:5:1)
- <etc.>
+**IMPORTANT**: Omitting the callback is deprecated. v0.12 will throw the
+errors as exceptions.
## fs.rename(oldPath, newPath, [callback])