diff --git a/doc/api/fs.md b/doc/api/fs.md index 4c801fe358cd6a..4468a9f087796a 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 {