Skip to content

Commit dee7800

Browse files
Delapouitecjihrig
authored andcommitted
doc: add links to EventEmitter in errors.md
PR-URL: #16861 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent f097e27 commit dee7800

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/errors.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ Errors that occur within _Asynchronous APIs_ may be reported in multiple ways:
7676
// Otherwise handle the data
7777
});
7878
```
79-
- When an asynchronous method is called on an object that is an `EventEmitter`,
80-
errors can be routed to that object's `'error'` event.
79+
- When an asynchronous method is called on an object that is an
80+
[`EventEmitter`][], errors can be routed to that object's `'error'` event.
8181

8282
```js
8383
const net = require('net');
@@ -105,7 +105,7 @@ and [event emitter-based][] APIs, which themselves represent a series of
105105
asynchronous operations over time (as opposed to a single operation that may
106106
pass or fail).
107107

108-
For *all* `EventEmitter` objects, if an `'error'` event handler is not
108+
For *all* [`EventEmitter`][] objects, if an `'error'` event handler is not
109109
provided, the error will be thrown, causing the Node.js process to report an
110110
unhandled exception and crash unless either: The [`domain`][domains] module is
111111
used appropriately or a handler has been registered for the
@@ -1433,7 +1433,7 @@ Used when a string that contains unescaped characters was received.
14331433
### ERR_UNHANDLED_ERROR
14341434

14351435
Used when an unhandled "error" occurs (for instance, when an `'error'` event
1436-
is emitted by an `EventEmitter` but an `'error'` handler is not registered).
1436+
is emitted by an [`EventEmitter`][] but an `'error'` handler is not registered).
14371437

14381438
<a id="ERR_UNKNOWN_ENCODING"></a>
14391439
### ERR_UNKNOWN_ENCODING
@@ -1509,6 +1509,7 @@ Used when creation of a [`zlib`][] object fails due to incorrect configuration.
15091509
[`crypto.timingSafeEqual()`]: crypto.html#crypto_crypto_timingsafeequal_a_b
15101510
[`dgram.createSocket()`]: dgram.html#dgram_dgram_createsocket_options_callback
15111511
[`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE
1512+
[`EventEmitter`]: events.html#events_class_eventemitter
15121513
[`hash.digest()`]: crypto.html#crypto_hash_digest_encoding
15131514
[`hash.update()`]: crypto.html#crypto_hash_update_data_inputencoding
15141515
[`readable._read()`]: stream.html#stream_readable_read_size_1

0 commit comments

Comments
 (0)