diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-22 05:44:26 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-27 19:20:06 +0300 |
commit | b08a867d6016ccf04783a0f91fdbcc3460daf234 (patch) | |
tree | 5df4b30220cde5ae5eac9ed956c9badac6ba08af /doc/api/domain.md | |
parent | fd992e6e36bb4b01a6ceb71cfeb3bae640b492a6 (diff) |
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/api/domain.md')
-rw-r--r-- | doc/api/domain.md | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/api/domain.md b/doc/api/domain.md index 226eb660f4b..63dbcabbbc2 100644 --- a/doc/api/domain.md +++ b/doc/api/domain.md @@ -135,7 +135,7 @@ if (cluster.isMaster) { // But don't keep the process open just for that! killtimer.unref(); - // stop taking new requests. + // Stop taking new requests. server.close(); // Let the master know we're dead. This will trigger a @@ -316,14 +316,13 @@ const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.bind((er, data) => { - // If this throws, it will also be passed to the domain + // If this throws, it will also be passed to the domain. return cb(er, data ? JSON.parse(data) : null); })); } d.on('error', (er) => { - // an error occurred somewhere. - // if we throw it now, it will crash the program + // An error occurred somewhere. If we throw it now, it will crash the program // with the normal line number and stack message. }); ``` @@ -377,7 +376,7 @@ function readSomeFile(filename, cb) { // callback since it is assumed to be the 'Error' argument // and thus intercepted by the domain. - // if this throws, it will also be passed to the domain + // If this throws, it will also be passed to the domain // so the error-handling logic can be moved to the 'error' // event on the domain instead of being repeated throughout // the program. @@ -386,8 +385,7 @@ function readSomeFile(filename, cb) { } d.on('error', (er) => { - // an error occurred somewhere. - // if we throw it now, it will crash the program + // An error occurred somewhere. If we throw it now, it will crash the program // with the normal line number and stack message. }); ``` |