Skip to content

Commit 49af20c

Browse files
DavidCai1111evanlucas
authored andcommitted
doc: update fs callback example error stack
Update the error stack printed in the default callback example in the fs doc, matching the latest lib/fs.js. Truncates the stack to make it easier to update in the future. PR-URL: #6617 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 9196d87 commit 49af20c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

doc/api/fs.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,11 @@ function bad() {
8282
bad();
8383
8484
$ env NODE_DEBUG=fs node script.js
85-
fs.js:66
86-
throw err;
87-
^
88-
Error: EISDIR, read
89-
at rethrow (fs.js:61:21)
90-
at maybeCallback (fs.js:79:42)
91-
at Object.fs.readFile (fs.js:153:18)
92-
at bad (/path/to/script.js:2:17)
93-
at Object.<anonymous> (/path/to/script.js:5:1)
94-
<etc.>
85+
fs.js:88
86+
throw backtrace;
87+
^
88+
Error: EISDIR: illegal operation on a directory, read
89+
<stack trace.>
9590
```
9691

9792
## Buffer API

0 commit comments

Comments
 (0)