diff --git a/doc/api/fs.md b/doc/api/fs.md index 48e1ea1bb177a5..b79461b8ee9887 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1397,6 +1397,7 @@ fs.open('myfile', 'wx', (err, fd) => { fs.exists('myfile', (exists) => { if (exists) { fs.open('myfile', 'r', (err, fd) => { + if (err) throw err; readMyData(fd); }); } else {