From 4924fb3226abd4334a156400c977f8b8a1a075be Mon Sep 17 00:00:00 2001 From: Delapouite Date: Tue, 7 Nov 2017 13:09:49 +0100 Subject: [PATCH] doc: add links to EventEmitter in errors.md PR-URL: https://github.com/nodejs/node/pull/16861 Reviewed-By: Vse Mozhet Byt Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil --- doc/api/errors.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 1210a721538cb9..548113a47d0285 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -76,8 +76,8 @@ Errors that occur within _Asynchronous APIs_ may be reported in multiple ways: // Otherwise handle the data }); ``` -- When an asynchronous method is called on an object that is an `EventEmitter`, - errors can be routed to that object's `'error'` event. +- When an asynchronous method is called on an object that is an + [`EventEmitter`][], errors can be routed to that object's `'error'` event. ```js const net = require('net'); @@ -105,7 +105,7 @@ and [event emitter-based][] APIs, which themselves represent a series of asynchronous operations over time (as opposed to a single operation that may pass or fail). -For *all* `EventEmitter` objects, if an `'error'` event handler is not +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`][domains] module is used appropriately or a handler has been registered for the @@ -1474,7 +1474,7 @@ Used when a string that contains unescaped characters was received. ### ERR_UNHANDLED_ERROR Used when an unhandled "error" occurs (for instance, when an `'error'` event -is emitted by an `EventEmitter` but an `'error'` handler is not registered). +is emitted by an [`EventEmitter`][] but an `'error'` handler is not registered). ### ERR_UNKNOWN_ENCODING @@ -1551,6 +1551,7 @@ Used when creation of a [`zlib`][] object fails due to incorrect configuration. [`crypto.timingSafeEqual()`]: crypto.html#crypto_crypto_timingsafeequal_a_b [`dgram.createSocket()`]: dgram.html#dgram_dgram_createsocket_options_callback [`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE +[`EventEmitter`]: events.html#events_class_eventemitter [`hash.digest()`]: crypto.html#crypto_hash_digest_encoding [`hash.update()`]: crypto.html#crypto_hash_update_data_inputencoding [`readable._read()`]: stream.html#stream_readable_read_size_1