@@ -6,13 +6,13 @@ Applications running in Node.js will generally experience four categories of |
6 | 6 | errors: |
7 | 7 |
|
8 | 8 | - Standard JavaScript errors such as: |
9 | | - - [`EvalError`][]: thrown when a call to `eval()` fails. |
10 | | - - [`SyntaxError`][]: thrown in response to improper JavaScript language |
| 9 | + - {EvalError} : thrown when a call to `eval()` fails. |
| 10 | + - {SyntaxError} : thrown in response to improper JavaScript language |
11 | 11 | syntax. |
12 | | - - [`RangeError`][]: thrown when a value is not within an expected range |
13 | | - - [`ReferenceError`][]: thrown when using undefined variables |
14 | | - - [`TypeError`][]: thrown when passing arguments of the wrong type |
15 | | - - [`URIError`][]: thrown when a global URI handling function is misused. |
| 12 | + - {RangeError} : thrown when a value is not within an expected range |
| 13 | + - {ReferenceError} : thrown when using undefined variables |
| 14 | + - {TypeError} : thrown when passing arguments of the wrong type |
| 15 | + - {URIError} : thrown when a global URI handling function is misused. |
16 | 16 | - System errors triggered by underlying operating system constraints such |
17 | 17 | as attempting to open a file that does not exist, attempting to send data |
18 | 18 | over a closed socket, etc; |
@@ -22,7 +22,7 @@ errors: |
22 | 22 | are raised typically by the `assert` module. |
23 | 23 |
|
24 | 24 | All JavaScript and System errors raised by Node.js inherit from, or are |
25 | | -instances of, the standard JavaScript [`Error`][] class and are guaranteed |
| 25 | +instances of, the standard JavaScript {Error} class and are guaranteed |
26 | 26 | to provide *at least* the properties available on that class. |
27 | 27 |
|
28 | 28 | ## Error Propagation and Interception |
@@ -36,7 +36,7 @@ called. |
36 | 36 |
|
37 | 37 | All JavaScript errors are handled as exceptions that *immediately* generate |
38 | 38 | and throw an error using the standard JavaScript `throw` mechanism. These |
39 | | -are handled using the [`try / catch` construct][] provided by the JavaScript |
| 39 | +are handled using the [`try / catch` construct][try-catch] provided by the JavaScript |
40 | 40 | language. |
41 | 41 |
|
42 | 42 | ```js |
@@ -105,7 +105,7 @@ pass or fail). |
105 | 105 |
|
106 | 106 | For *all* `EventEmitter` objects, if an `'error'` event handler is not |
107 | 107 | provided, the error will be thrown, causing the Node.js process to report an |
108 | | -unhandled exception and crash unless either: The [`domain`][] module is used |
| 108 | +unhandled exception and crash unless either: The [`domain`][domains] module is used |
109 | 109 | appropriately or a handler has been registered for the |
110 | 110 | [`process.on('uncaughtException')`][] event. |
111 | 111 |
|
@@ -520,9 +520,6 @@ found [here][online]. |
520 | 520 | encountered by [`http`][] or [`net`][] -- often a sign that a `socket.end()` |
521 | 521 | was not properly called. |
522 | 522 |
|
523 | | -[`domain`]: domain.html |
524 | | -[`EvalError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError |
525 | | -[`Error`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error |
526 | 523 | [`fs.readdir`]: fs.html#fs_fs_readdir_path_callback |
527 | 524 | [`fs.readFileSync`]: fs.html#fs_fs_readfilesync_file_options |
528 | 525 | [`fs.unlink`]: fs.html#fs_fs_unlink_path_callback |
@@ -531,18 +528,12 @@ found [here][online]. |
531 | 528 | [`https`]: https.html |
532 | 529 | [`net`]: net.html |
533 | 530 | [`process.on('uncaughtException')`]: process.html#process_event_uncaughtexception |
534 | | -[`try / catch` construct]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch |
535 | | -[`try { } catch(err) { }`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch |
536 | 531 | [domains]: domain.html |
537 | 532 | [event emitter-based]: events.html#events_class_events_eventemitter |
538 | 533 | [file descriptors]: https://en.wikipedia.org/wiki/File_descriptor |
539 | 534 | [online]: http://man7.org/linux/man-pages/man3/errno.3.html |
540 | 535 | [stream-based]: stream.html |
541 | 536 | [syscall]: http://man7.org/linux/man-pages/man2/syscall.2.html |
| 537 | +[try-catch]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch |
542 | 538 | [V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API |
543 | 539 | [vm]: vm.html |
544 | | -[`SyntaxError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError |
545 | | -[`RangeError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError |
546 | | -[`ReferenceError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError |
547 | | -[`TypeError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError |
548 | | -[`URIError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError |