diff options
author | Alexander Makarenko <estliberitas@gmail.com> | 2016-02-20 03:07:00 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-04-18 09:53:52 -0700 |
commit | eafd31a4eb028e1566c2384e710eb5397f5490e5 (patch) | |
tree | c97b2ffce73ea3824755184a716a331e78229578 /doc | |
parent | 88c35e70a06d1d048cc32153d8214bcd28107528 (diff) | |
download | android-node-v8-eafd31a4eb028e1566c2384e710eb5397f5490e5.tar.gz android-node-v8-eafd31a4eb028e1566c2384e710eb5397f5490e5.tar.bz2 android-node-v8-eafd31a4eb028e1566c2384e710eb5397f5490e5.zip |
tools,doc: parse types in braces everywhere
Also add `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`,
`TypeError`, `URIError` to list of global types. Fix errors.markdown
copy accordingly.
Fixes: https://github.com/nodejs/node/issues/5325.
PR-URL: https://github.com/nodejs/node/pull/5329
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/errors.markdown | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index 810a8b7e36..2d4ba89e00 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -6,13 +6,13 @@ Applications running in Node.js will generally experience four categories of errors: - Standard JavaScript errors such as: - - [`EvalError`][]: thrown when a call to `eval()` fails. - - [`SyntaxError`][]: thrown in response to improper JavaScript language + - {EvalError} : thrown when a call to `eval()` fails. + - {SyntaxError} : thrown in response to improper JavaScript language syntax. - - [`RangeError`][]: thrown when a value is not within an expected range - - [`ReferenceError`][]: thrown when using undefined variables - - [`TypeError`][]: thrown when passing arguments of the wrong type - - [`URIError`][]: thrown when a global URI handling function is misused. + - {RangeError} : thrown when a value is not within an expected range + - {ReferenceError} : thrown when using undefined variables + - {TypeError} : thrown when passing arguments of the wrong type + - {URIError} : thrown when a global URI handling function is misused. - System errors triggered by underlying operating system constraints such as attempting to open a file that does not exist, attempting to send data over a closed socket, etc; @@ -22,7 +22,7 @@ errors: are raised typically by the `assert` module. All JavaScript and System errors raised by Node.js inherit from, or are -instances of, the standard JavaScript [`Error`][] class and are guaranteed +instances of, the standard JavaScript {Error} class and are guaranteed to provide *at least* the properties available on that class. ## Error Propagation and Interception @@ -36,7 +36,7 @@ called. All JavaScript errors are handled as exceptions that *immediately* generate and throw an error using the standard JavaScript `throw` mechanism. These -are handled using the [`try / catch` construct][] provided by the JavaScript +are handled using the [`try / catch` construct][try-catch] provided by the JavaScript language. ```js @@ -105,7 +105,7 @@ pass or fail). For *all* `EventEmitter` objects, if an `'error'` event handler is not provided, the error will be thrown, causing the Node.js process to report an -unhandled exception and crash unless either: The [`domain`][] module is used +unhandled exception and crash unless either: The [`domain`][domains] module is used appropriately or a handler has been registered for the [`process.on('uncaughtException')`][] event. @@ -520,9 +520,6 @@ found [here][online]. encountered by [`http`][] or [`net`][] -- often a sign that a `socket.end()` was not properly called. -[`domain`]: domain.html -[`EvalError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError -[`Error`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error [`fs.readdir`]: fs.html#fs_fs_readdir_path_callback [`fs.readFileSync`]: fs.html#fs_fs_readfilesync_file_options [`fs.unlink`]: fs.html#fs_fs_unlink_path_callback @@ -531,18 +528,12 @@ found [here][online]. [`https`]: https.html [`net`]: net.html [`process.on('uncaughtException')`]: process.html#process_event_uncaughtexception -[`try / catch` construct]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch -[`try { } catch(err) { }`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch [domains]: domain.html [event emitter-based]: events.html#events_class_events_eventemitter [file descriptors]: https://en.wikipedia.org/wiki/File_descriptor [online]: http://man7.org/linux/man-pages/man3/errno.3.html [stream-based]: stream.html [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html +[try-catch]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch [V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API [vm]: vm.html -[`SyntaxError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError -[`RangeError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError -[`ReferenceError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError -[`TypeError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError -[`URIError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError |