Skip to content

Commit 4924fb3

Browse files
Delapouitevsemozhetbyt
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 83fcb9f commit 4924fb3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/errors.md

Lines changed: 5 additions & 4 deletions
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
@@ -1474,7 +1474,7 @@ Used when a string that contains unescaped characters was received.
14741474
### ERR_UNHANDLED_ERROR
14751475

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

14791479
<a id="ERR_UNKNOWN_ENCODING"></a>
14801480
### ERR_UNKNOWN_ENCODING
@@ -1551,6 +1551,7 @@ Used when creation of a [`zlib`][] object fails due to incorrect configuration.
15511551
[`crypto.timingSafeEqual()`]: crypto.html#crypto_crypto_timingsafeequal_a_b
15521552
[`dgram.createSocket()`]: dgram.html#dgram_dgram_createsocket_options_callback
15531553
[`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE
1554+
[`EventEmitter`]: events.html#events_class_eventemitter
15541555
[`hash.digest()`]: crypto.html#crypto_hash_digest_encoding
15551556
[`hash.update()`]: crypto.html#crypto_hash_update_data_inputencoding
15561557
[`readable._read()`]: stream.html#stream_readable_read_size_1

0 commit comments

Comments
 (0)