From c6921091630208f9eabb16ad4c8bf66fd5774f45 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 1 Oct 2024 12:57:28 -0400 Subject: [PATCH] doc: put errors in right location --- doc/api/errors.md | 136 +++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 69 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index a6aaa57d924f26..c4ba0966522edd 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -2344,6 +2344,17 @@ A non-context-aware native addon was loaded in a process that disallows them. A given value is out of the accepted range. + + +### `ERR_OPERATION_FAILED` + + + +An operation failed. This is typically used to signal the general failure +of an asynchronous operation. + ### `ERR_PACKAGE_IMPORT_NOT_DEFINED` @@ -2420,6 +2431,42 @@ Accessing `Object.prototype.__proto__` has been forbidden using [`Object.setPrototypeOf`][] should be used to get and set the prototype of an object. + + +### `ERR_QUIC_CONNECTION_FAILED` + + + +> Stability: 1 - Experimental + +Establishing a QUIC connection failed. + + + +### `ERR_QUIC_ENDPOINT_CLOSED` + + + +> Stability: 1 - Experimental + +A QUIC Endpoint closed with an error. + + + +### `ERR_QUIC_OPEN_STREAM_FAILED` + + + +> Stability: 1 - Experimental + +Opening a QUIC stream failed. + ### `ERR_REQUIRE_CYCLE_MODULE` @@ -2448,25 +2495,6 @@ To see where the top-level await is, use `--experimental-print-required-tla` (this would execute the modules before looking for the top-level awaits). - - -### `ERR_REQUIRE_ESM` - - - -> Stability: 0 - Deprecated - -An attempt was made to `require()` an [ES Module][]. - -This error has been deprecated since `require()` now supports loading synchronous -ES modules. When `require()` encounters an ES module that contains top-level -`await`, it will throw [`ERR_REQUIRE_ASYNC_MODULE`][] instead. - ### `ERR_SCRIPT_EXECUTION_INTERRUPTED` @@ -3271,6 +3299,16 @@ removed: v12.5.0 The value passed to `postMessage()` contained an object that is not supported for transferring. + + +### `ERR_CPU_USAGE` + + + +The native call from `process.cpuUsage` could not be processed. + ### `ERR_CRYPTO_HASH_DIGEST_NO_UTF16` @@ -3610,17 +3648,6 @@ Used by the `Node-API` when `Constructor.prototype` is not an object. A Node.js API was called in an unsupported manner, such as `Buffer.write(string, encoding, offset[, length])`. - - -### `ERR_OPERATION_FAILED` - - - -An operation failed. This is typically used to signal the general failure -of an asynchronous operation. - ### `ERR_OUTOFMEMORY` @@ -3644,41 +3671,22 @@ removed: v10.0.0 The `node:repl` module was unable to parse data from the REPL history file. - - -### `ERR_QUIC_CONNECTION_FAILED` - - - -> Stability: 1 - Experimental - -Establishing a QUIC connection failed. - - - -### `ERR_QUIC_ENDPOINT_CLOSED` - - - -> Stability: 1 - Experimental - -A QUIC Endpoint closed with an error. - - + -### `ERR_QUIC_OPEN_STREAM_FAILED` +### `ERR_REQUIRE_ESM` -> Stability: 1 - Experimental +An attempt was made to `require()` an [ES Module][]. -Opening a QUIC stream failed. +This error has been deprecated since `require()` now supports loading synchronous +ES modules. When `require()` encounters an ES module that contains top-level +`await`, it will throw [`ERR_REQUIRE_ASYNC_MODULE`][] instead. @@ -3850,16 +3858,6 @@ removed: v10.0.0 Used when an attempt is made to use a `zlib` object after it has already been closed. - - -### `ERR_CPU_USAGE` - - - -The native call from `process.cpuUsage` could not be processed. - ## OpenSSL Error Codes