Skip to content

Commit

Permalink
doc: update fs callback example error stack
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
DavidCai1111 authored and evanlucas committed May 17, 2016
1 parent 9196d87 commit 49af20c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,11 @@ function bad() {
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.>
fs.js:88
throw backtrace;
^
Error: EISDIR: illegal operation on a directory, read
<stack trace.>
```

## Buffer API
Expand Down

0 comments on commit 49af20c

Please sign in to comment.