@idlebox/node-error-codes 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/nodejs-error-code.generated.d.ts +17 -5
- package/lib/nodejs-error-code.generated.d.ts.map +1 -1
- package/lib/nodejs-error-code.generated.js +444 -432
- package/lib/nodejs-error-code.generated.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -5
- package/src/cache.generated.json +72 -58
- package/src/nodejs-error-code.generated.ts +17 -5
- package/src/nodejs-error-code.generator.ts +2 -2
package/src/cache.generated.json
CHANGED
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
],
|
|
35
35
|
"properties": [
|
|
36
36
|
{
|
|
37
|
-
"textRaw": "`stackTraceLimit` {number}",
|
|
37
|
+
"textRaw": "`stackTraceLimit` Type: {number}",
|
|
38
38
|
"type": "number",
|
|
39
|
-
"name": "
|
|
39
|
+
"name": "Type",
|
|
40
40
|
"desc": "<p>The <code>Error.stackTraceLimit</code> property specifies the number of stack frames\ncollected by a stack trace (whether generated by <code>new Error().stack</code> or\n<code>Error.captureStackTrace(obj)</code>).</p>\n<p>The default value is <code>10</code> but may be set to any valid JavaScript number. Changes\nwill affect any stack trace captured <em>after</em> the value has been changed.</p>\n<p>If set to a non-number value, or set to a negative number, stack traces will\nnot capture any frames.</p>"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
"textRaw": "`cause` {any}",
|
|
43
|
+
"textRaw": "`cause` Type: {any}",
|
|
44
44
|
"type": "any",
|
|
45
|
-
"name": "
|
|
45
|
+
"name": "Type",
|
|
46
46
|
"meta": {
|
|
47
47
|
"added": [
|
|
48
48
|
"v16.9.0"
|
|
@@ -52,21 +52,21 @@
|
|
|
52
52
|
"desc": "<p>If present, the <code>error.cause</code> property is the underlying cause of the <code>Error</code>.\nIt is used when catching an error and throwing a new one with a different\nmessage or code in order to still have access to the original error.</p>\n<p>The <code>error.cause</code> property is typically set by calling\n<code>new Error(message, { cause })</code>. It is not set by the constructor if the\n<code>cause</code> option is not provided.</p>\n<p>This property allows errors to be chained. When serializing <code>Error</code> objects,\n<a href=\"util.html#utilinspectobject-options\"><code>util.inspect()</code></a> recursively serializes <code>error.cause</code> if it is set.</p>\n<pre><code class=\"language-js\">const cause = new Error('The remote HTTP server responded with a 500 status');\nconst symptom = new Error('The message failed to send', { cause });\n\nconsole.log(symptom);\n// Prints:\n// Error: The message failed to send\n// at REPL2:1:17\n// at Script.runInThisContext (node:vm:130:12)\n// ... 7 lines matching cause stack trace ...\n// at [_line] [as _line] (node:internal/readline/interface:886:18) {\n// [cause]: Error: The remote HTTP server responded with a 500 status\n// at REPL1:1:15\n// at Script.runInThisContext (node:vm:130:12)\n// at REPLServer.defaultEval (node:repl:574:29)\n// at bound (node:domain:426:15)\n// at REPLServer.runBound [as eval] (node:domain:437:12)\n// at REPLServer.onLine (node:repl:902:10)\n// at REPLServer.emit (node:events:549:35)\n// at REPLServer.emit (node:domain:482:12)\n// at [_onLine] [as _onLine] (node:internal/readline/interface:425:12)\n// at [_line] [as _line] (node:internal/readline/interface:886:18)\n</code></pre>"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
"textRaw": "`code` {string}",
|
|
55
|
+
"textRaw": "`code` Type: {string}",
|
|
56
56
|
"type": "string",
|
|
57
|
-
"name": "
|
|
57
|
+
"name": "Type",
|
|
58
58
|
"desc": "<p>The <code>error.code</code> property is a string label that identifies the kind of error.\n<code>error.code</code> is the most stable way to identify an error. It will only change\nbetween major versions of Node.js. In contrast, <code>error.message</code> strings may\nchange between any versions of Node.js. See <a href=\"#nodejs-error-codes\">Node.js error codes</a> for details\nabout specific codes.</p>"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
"textRaw": "`message` {string}",
|
|
61
|
+
"textRaw": "`message` Type: {string}",
|
|
62
62
|
"type": "string",
|
|
63
|
-
"name": "
|
|
63
|
+
"name": "Type",
|
|
64
64
|
"desc": "<p>The <code>error.message</code> property is the string description of the error as set by\ncalling <code>new Error(message)</code>. The <code>message</code> passed to the constructor will also\nappear in the first line of the stack trace of the <code>Error</code>, however changing\nthis property after the <code>Error</code> object is created <em>may not</em> change the first\nline of the stack trace (for example, when <code>error.stack</code> is read before this\nproperty is changed).</p>\n<pre><code class=\"language-js\">const err = new Error('The message');\nconsole.error(err.message);\n// Prints: The message\n</code></pre>"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
"textRaw": "`stack` {string}",
|
|
67
|
+
"textRaw": "`stack` Type: {string}",
|
|
68
68
|
"type": "string",
|
|
69
|
-
"name": "
|
|
69
|
+
"name": "Type",
|
|
70
70
|
"desc": "<p>The <code>error.stack</code> property is a string describing the point in the code at which\nthe <code>Error</code> was instantiated.</p>\n<pre><code class=\"language-console\">Error: Things keep happening!\n at /home/gbusey/file.js:525:2\n at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)\n at Actor.<anonymous> (/home/gbusey/actors.js:400:8)\n at increaseSynergy (/home/gbusey/actors.js:701:6)\n</code></pre>\n<p>The first line is formatted as <code><error class name>: <error message></code>, and\nis followed by a series of stack frames (each line beginning with \"at \").\nEach frame describes a call site within the code that lead to the error being\ngenerated. V8 attempts to display a name for each function (by variable name,\nfunction name, or object method name), but occasionally it will not be able to\nfind a suitable name. If V8 cannot determine a name for the function, only\nlocation information will be displayed for that frame. Otherwise, the\ndetermined function name will be displayed with location information appended\nin parentheses.</p>\n<p>Frames are only generated for JavaScript functions. If, for example, execution\nsynchronously passes through a C++ addon function called <code>cheetahify</code> which\nitself calls a JavaScript function, the frame representing the <code>cheetahify</code> call\nwill not be present in the stack traces:</p>\n<pre><code class=\"language-js\">const cheetahify = require('./native-binding.node');\n\nfunction makeFaster() {\n // `cheetahify()` *synchronously* calls speedy.\n cheetahify(function speedy() {\n throw new Error('oh no!');\n });\n}\n\nmakeFaster();\n// will throw:\n// /home/gbusey/file.js:6\n// throw new Error('oh no!');\n// ^\n// Error: oh no!\n// at speedy (/home/gbusey/file.js:6:11)\n// at makeFaster (/home/gbusey/file.js:5:3)\n// at Object.<anonymous> (/home/gbusey/file.js:10:1)\n// at Module._compile (module.js:456:26)\n// at Object.Module._extensions..js (module.js:474:10)\n// at Module.load (module.js:356:32)\n// at Function.Module._load (module.js:312:12)\n// at Function.Module.runMain (module.js:497:10)\n// at startup (node.js:119:16)\n// at node.js:906:3\n</code></pre>\n<p>The location information will be one of:</p>\n<ul>\n<li><code>native</code>, if the frame represents a call internal to V8 (as in <code>[].forEach</code>).</li>\n<li><code>plain-filename.js:line:column</code>, if the frame represents a call internal\nto Node.js.</li>\n<li><code>/absolute/path/to/file.js:line:column</code>, if the frame represents a call in\na user program (using CommonJS module system), or its dependencies.</li>\n<li><code><transport-protocol>:///url/to/module/file.mjs:line:column</code>, if the frame\nrepresents a call in a user program (using ES module system), or\nits dependencies.</li>\n</ul>\n<p>The string representing the stack trace is lazily generated when the\n<code>error.stack</code> property is <strong>accessed</strong>.</p>\n<p>The number of frames captured by the stack trace is bounded by the smaller of\n<code>Error.stackTraceLimit</code> or the number of available frames on the current event\nloop tick.</p>"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
@@ -127,57 +127,57 @@
|
|
|
127
127
|
"desc": "<ul>\n<li>Extends: <a href=\"errors.html#class-error\" class=\"type\"><errors.Error></a></li>\n</ul>\n<p>Node.js generates system errors when exceptions occur within its runtime\nenvironment. These usually occur when an application violates an operating\nsystem constraint. For example, a system error will occur if an application\nattempts to read a file that does not exist.</p>\n<ul>\n<li><code>address</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the address to which a network connection\nfailed</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> The string error code</li>\n<li><code>dest</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the file path destination when reporting a file\nsystem error</li>\n<li><code>errno</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\"><number></a> The system-provided error number</li>\n<li><code>info</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\" class=\"type\"><Object></a> If present, extra details about the error condition</li>\n<li><code>message</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> A system-provided human-readable description of the error</li>\n<li><code>path</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the file path when reporting a file system error</li>\n<li><code>port</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\"><number></a> If present, the network connection port that is not available</li>\n<li><code>syscall</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> The name of the system call that triggered the error</li>\n</ul>",
|
|
128
128
|
"properties": [
|
|
129
129
|
{
|
|
130
|
-
"textRaw": "`address` {string}",
|
|
130
|
+
"textRaw": "`address` Type: {string}",
|
|
131
131
|
"type": "string",
|
|
132
|
-
"name": "
|
|
132
|
+
"name": "Type",
|
|
133
133
|
"desc": "<p>If present, <code>error.address</code> is a string describing the address to which a\nnetwork connection failed.</p>"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
"textRaw": "`code` {string}",
|
|
136
|
+
"textRaw": "`code` Type: {string}",
|
|
137
137
|
"type": "string",
|
|
138
|
-
"name": "
|
|
138
|
+
"name": "Type",
|
|
139
139
|
"desc": "<p>The <code>error.code</code> property is a string representing the error code.</p>"
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
"textRaw": "`dest` {string}",
|
|
142
|
+
"textRaw": "`dest` Type: {string}",
|
|
143
143
|
"type": "string",
|
|
144
|
-
"name": "
|
|
144
|
+
"name": "Type",
|
|
145
145
|
"desc": "<p>If present, <code>error.dest</code> is the file path destination when reporting a file\nsystem error.</p>"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
"textRaw": "`errno` {number}",
|
|
148
|
+
"textRaw": "`errno` Type: {number}",
|
|
149
149
|
"type": "number",
|
|
150
|
-
"name": "
|
|
150
|
+
"name": "Type",
|
|
151
151
|
"desc": "<p>The <code>error.errno</code> property is a negative number which corresponds\nto the error code defined in <a href=\"https://docs.libuv.org/en/v1.x/errors.html\"><code>libuv Error handling</code></a>.</p>\n<p>On Windows the error number provided by the system will be normalized by libuv.</p>\n<p>To get the string representation of the error code, use\n<a href=\"util.html#utilgetsystemerrornameerr\"><code>util.getSystemErrorName(error.errno)</code></a>.</p>"
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"textRaw": "`info` {Object}",
|
|
154
|
+
"textRaw": "`info` Type: {Object}",
|
|
155
155
|
"type": "Object",
|
|
156
|
-
"name": "
|
|
156
|
+
"name": "Type",
|
|
157
157
|
"desc": "<p>If present, <code>error.info</code> is an object with details about the error condition.</p>"
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
|
-
"textRaw": "`message` {string}",
|
|
160
|
+
"textRaw": "`message` Type: {string}",
|
|
161
161
|
"type": "string",
|
|
162
|
-
"name": "
|
|
162
|
+
"name": "Type",
|
|
163
163
|
"desc": "<p><code>error.message</code> is a system-provided human-readable description of the error.</p>"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
"textRaw": "`path` {string}",
|
|
166
|
+
"textRaw": "`path` Type: {string}",
|
|
167
167
|
"type": "string",
|
|
168
|
-
"name": "
|
|
168
|
+
"name": "Type",
|
|
169
169
|
"desc": "<p>If present, <code>error.path</code> is a string containing a relevant invalid pathname.</p>"
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
|
-
"textRaw": "`port` {number}",
|
|
172
|
+
"textRaw": "`port` Type: {number}",
|
|
173
173
|
"type": "number",
|
|
174
|
-
"name": "
|
|
174
|
+
"name": "Type",
|
|
175
175
|
"desc": "<p>If present, <code>error.port</code> is the network connection port that is not available.</p>"
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
|
-
"textRaw": "`syscall` {string}",
|
|
178
|
+
"textRaw": "`syscall` Type: {string}",
|
|
179
179
|
"type": "string",
|
|
180
|
-
"name": "
|
|
180
|
+
"name": "Type",
|
|
181
181
|
"desc": "<p>The <code>error.syscall</code> property is a string describing the <a href=\"https://man7.org/linux/man-pages/man2/syscalls.2.html\">syscall</a> that failed.</p>"
|
|
182
182
|
}
|
|
183
183
|
],
|
|
@@ -1046,7 +1046,7 @@
|
|
|
1046
1046
|
{
|
|
1047
1047
|
"textRaw": "`ERR_FS_FILE_TOO_LARGE`",
|
|
1048
1048
|
"name": "`err_fs_file_too_large`",
|
|
1049
|
-
"desc": "<p>An attempt
|
|
1049
|
+
"desc": "<p>An attempt was made to read a file larger than the supported 2 GiB limit for\n<code>fs.readFile()</code>. This is not a limitation of <code>Buffer</code>, but an internal I/O constraint.\nFor handling larger files, consider using <code>fs.createReadStream()</code> to read the\nfile in chunks.</p>\n<p><a id=\"ERR_FS_WATCH_QUEUE_OVERFLOW\"></a></p>",
|
|
1050
1050
|
"type": "module",
|
|
1051
1051
|
"displayName": "`ERR_FS_FILE_TOO_LARGE`"
|
|
1052
1052
|
},
|
|
@@ -2205,10 +2205,24 @@
|
|
|
2205
2205
|
{
|
|
2206
2206
|
"textRaw": "`ERR_PROTO_ACCESS`",
|
|
2207
2207
|
"name": "`err_proto_access`",
|
|
2208
|
-
"desc": "<p>Accessing <code>Object.prototype.__proto__</code> has been forbidden using\n<a href=\"cli.html#--disable-protomode\"><code>--disable-proto=throw</code></a>. <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf\"><code>Object.getPrototypeOf</code></a> and\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf\"><code>Object.setPrototypeOf</code></a> should be used to get and set the prototype of an\nobject.</p>\n<p><a id=\"
|
|
2208
|
+
"desc": "<p>Accessing <code>Object.prototype.__proto__</code> has been forbidden using\n<a href=\"cli.html#--disable-protomode\"><code>--disable-proto=throw</code></a>. <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf\"><code>Object.getPrototypeOf</code></a> and\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf\"><code>Object.setPrototypeOf</code></a> should be used to get and set the prototype of an\nobject.</p>\n<p><a id=\"ERR_PROXY_INVALID_CONFIG\"></a></p>",
|
|
2209
2209
|
"type": "module",
|
|
2210
2210
|
"displayName": "`ERR_PROTO_ACCESS`"
|
|
2211
2211
|
},
|
|
2212
|
+
{
|
|
2213
|
+
"textRaw": "`ERR_PROXY_INVALID_CONFIG`",
|
|
2214
|
+
"name": "`err_proxy_invalid_config`",
|
|
2215
|
+
"desc": "<p>Failed to proxy a request because the proxy configuration is invalid.</p>\n<p><a id=\"ERR_PROXY_TUNNEL\"></a></p>",
|
|
2216
|
+
"type": "module",
|
|
2217
|
+
"displayName": "`ERR_PROXY_INVALID_CONFIG`"
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"textRaw": "`ERR_PROXY_TUNNEL`",
|
|
2221
|
+
"name": "`err_proxy_tunnel`",
|
|
2222
|
+
"desc": "<p>Failed to establish proxy tunnel when <code>NODE_USE_ENV_PROXY</code> or <code>--use-env-proxy</code> is enabled.</p>\n<p><a id=\"ERR_QUIC_APPLICATION_ERROR\"></a></p>",
|
|
2223
|
+
"type": "module",
|
|
2224
|
+
"displayName": "`ERR_PROXY_TUNNEL`"
|
|
2225
|
+
},
|
|
2212
2226
|
{
|
|
2213
2227
|
"textRaw": "`ERR_QUIC_APPLICATION_ERROR`",
|
|
2214
2228
|
"name": "`err_quic_application_error`",
|
|
@@ -4260,15 +4274,15 @@
|
|
|
4260
4274
|
],
|
|
4261
4275
|
"properties": [
|
|
4262
4276
|
{
|
|
4263
|
-
"textRaw": "`stackTraceLimit` {number}",
|
|
4277
|
+
"textRaw": "`stackTraceLimit` Type: {number}",
|
|
4264
4278
|
"type": "number",
|
|
4265
|
-
"name": "
|
|
4279
|
+
"name": "Type",
|
|
4266
4280
|
"desc": "<p>The <code>Error.stackTraceLimit</code> property specifies the number of stack frames\ncollected by a stack trace (whether generated by <code>new Error().stack</code> or\n<code>Error.captureStackTrace(obj)</code>).</p>\n<p>The default value is <code>10</code> but may be set to any valid JavaScript number. Changes\nwill affect any stack trace captured <em>after</em> the value has been changed.</p>\n<p>If set to a non-number value, or set to a negative number, stack traces will\nnot capture any frames.</p>"
|
|
4267
4281
|
},
|
|
4268
4282
|
{
|
|
4269
|
-
"textRaw": "`cause` {any}",
|
|
4283
|
+
"textRaw": "`cause` Type: {any}",
|
|
4270
4284
|
"type": "any",
|
|
4271
|
-
"name": "
|
|
4285
|
+
"name": "Type",
|
|
4272
4286
|
"meta": {
|
|
4273
4287
|
"added": [
|
|
4274
4288
|
"v16.9.0"
|
|
@@ -4278,21 +4292,21 @@
|
|
|
4278
4292
|
"desc": "<p>If present, the <code>error.cause</code> property is the underlying cause of the <code>Error</code>.\nIt is used when catching an error and throwing a new one with a different\nmessage or code in order to still have access to the original error.</p>\n<p>The <code>error.cause</code> property is typically set by calling\n<code>new Error(message, { cause })</code>. It is not set by the constructor if the\n<code>cause</code> option is not provided.</p>\n<p>This property allows errors to be chained. When serializing <code>Error</code> objects,\n<a href=\"util.html#utilinspectobject-options\"><code>util.inspect()</code></a> recursively serializes <code>error.cause</code> if it is set.</p>\n<pre><code class=\"language-js\">const cause = new Error('The remote HTTP server responded with a 500 status');\nconst symptom = new Error('The message failed to send', { cause });\n\nconsole.log(symptom);\n// Prints:\n// Error: The message failed to send\n// at REPL2:1:17\n// at Script.runInThisContext (node:vm:130:12)\n// ... 7 lines matching cause stack trace ...\n// at [_line] [as _line] (node:internal/readline/interface:886:18) {\n// [cause]: Error: The remote HTTP server responded with a 500 status\n// at REPL1:1:15\n// at Script.runInThisContext (node:vm:130:12)\n// at REPLServer.defaultEval (node:repl:574:29)\n// at bound (node:domain:426:15)\n// at REPLServer.runBound [as eval] (node:domain:437:12)\n// at REPLServer.onLine (node:repl:902:10)\n// at REPLServer.emit (node:events:549:35)\n// at REPLServer.emit (node:domain:482:12)\n// at [_onLine] [as _onLine] (node:internal/readline/interface:425:12)\n// at [_line] [as _line] (node:internal/readline/interface:886:18)\n</code></pre>"
|
|
4279
4293
|
},
|
|
4280
4294
|
{
|
|
4281
|
-
"textRaw": "`code` {string}",
|
|
4295
|
+
"textRaw": "`code` Type: {string}",
|
|
4282
4296
|
"type": "string",
|
|
4283
|
-
"name": "
|
|
4297
|
+
"name": "Type",
|
|
4284
4298
|
"desc": "<p>The <code>error.code</code> property is a string label that identifies the kind of error.\n<code>error.code</code> is the most stable way to identify an error. It will only change\nbetween major versions of Node.js. In contrast, <code>error.message</code> strings may\nchange between any versions of Node.js. See <a href=\"#nodejs-error-codes\">Node.js error codes</a> for details\nabout specific codes.</p>"
|
|
4285
4299
|
},
|
|
4286
4300
|
{
|
|
4287
|
-
"textRaw": "`message` {string}",
|
|
4301
|
+
"textRaw": "`message` Type: {string}",
|
|
4288
4302
|
"type": "string",
|
|
4289
|
-
"name": "
|
|
4303
|
+
"name": "Type",
|
|
4290
4304
|
"desc": "<p>The <code>error.message</code> property is the string description of the error as set by\ncalling <code>new Error(message)</code>. The <code>message</code> passed to the constructor will also\nappear in the first line of the stack trace of the <code>Error</code>, however changing\nthis property after the <code>Error</code> object is created <em>may not</em> change the first\nline of the stack trace (for example, when <code>error.stack</code> is read before this\nproperty is changed).</p>\n<pre><code class=\"language-js\">const err = new Error('The message');\nconsole.error(err.message);\n// Prints: The message\n</code></pre>"
|
|
4291
4305
|
},
|
|
4292
4306
|
{
|
|
4293
|
-
"textRaw": "`stack` {string}",
|
|
4307
|
+
"textRaw": "`stack` Type: {string}",
|
|
4294
4308
|
"type": "string",
|
|
4295
|
-
"name": "
|
|
4309
|
+
"name": "Type",
|
|
4296
4310
|
"desc": "<p>The <code>error.stack</code> property is a string describing the point in the code at which\nthe <code>Error</code> was instantiated.</p>\n<pre><code class=\"language-console\">Error: Things keep happening!\n at /home/gbusey/file.js:525:2\n at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)\n at Actor.<anonymous> (/home/gbusey/actors.js:400:8)\n at increaseSynergy (/home/gbusey/actors.js:701:6)\n</code></pre>\n<p>The first line is formatted as <code><error class name>: <error message></code>, and\nis followed by a series of stack frames (each line beginning with \"at \").\nEach frame describes a call site within the code that lead to the error being\ngenerated. V8 attempts to display a name for each function (by variable name,\nfunction name, or object method name), but occasionally it will not be able to\nfind a suitable name. If V8 cannot determine a name for the function, only\nlocation information will be displayed for that frame. Otherwise, the\ndetermined function name will be displayed with location information appended\nin parentheses.</p>\n<p>Frames are only generated for JavaScript functions. If, for example, execution\nsynchronously passes through a C++ addon function called <code>cheetahify</code> which\nitself calls a JavaScript function, the frame representing the <code>cheetahify</code> call\nwill not be present in the stack traces:</p>\n<pre><code class=\"language-js\">const cheetahify = require('./native-binding.node');\n\nfunction makeFaster() {\n // `cheetahify()` *synchronously* calls speedy.\n cheetahify(function speedy() {\n throw new Error('oh no!');\n });\n}\n\nmakeFaster();\n// will throw:\n// /home/gbusey/file.js:6\n// throw new Error('oh no!');\n// ^\n// Error: oh no!\n// at speedy (/home/gbusey/file.js:6:11)\n// at makeFaster (/home/gbusey/file.js:5:3)\n// at Object.<anonymous> (/home/gbusey/file.js:10:1)\n// at Module._compile (module.js:456:26)\n// at Object.Module._extensions..js (module.js:474:10)\n// at Module.load (module.js:356:32)\n// at Function.Module._load (module.js:312:12)\n// at Function.Module.runMain (module.js:497:10)\n// at startup (node.js:119:16)\n// at node.js:906:3\n</code></pre>\n<p>The location information will be one of:</p>\n<ul>\n<li><code>native</code>, if the frame represents a call internal to V8 (as in <code>[].forEach</code>).</li>\n<li><code>plain-filename.js:line:column</code>, if the frame represents a call internal\nto Node.js.</li>\n<li><code>/absolute/path/to/file.js:line:column</code>, if the frame represents a call in\na user program (using CommonJS module system), or its dependencies.</li>\n<li><code><transport-protocol>:///url/to/module/file.mjs:line:column</code>, if the frame\nrepresents a call in a user program (using ES module system), or\nits dependencies.</li>\n</ul>\n<p>The string representing the stack trace is lazily generated when the\n<code>error.stack</code> property is <strong>accessed</strong>.</p>\n<p>The number of frames captured by the stack trace is bounded by the smaller of\n<code>Error.stackTraceLimit</code> or the number of available frames on the current event\nloop tick.</p>"
|
|
4297
4311
|
}
|
|
4298
4312
|
],
|
|
@@ -4353,57 +4367,57 @@
|
|
|
4353
4367
|
"desc": "<ul>\n<li>Extends: <a href=\"errors.html#class-error\" class=\"type\"><errors.Error></a></li>\n</ul>\n<p>Node.js generates system errors when exceptions occur within its runtime\nenvironment. These usually occur when an application violates an operating\nsystem constraint. For example, a system error will occur if an application\nattempts to read a file that does not exist.</p>\n<ul>\n<li><code>address</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the address to which a network connection\nfailed</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> The string error code</li>\n<li><code>dest</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the file path destination when reporting a file\nsystem error</li>\n<li><code>errno</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\"><number></a> The system-provided error number</li>\n<li><code>info</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\" class=\"type\"><Object></a> If present, extra details about the error condition</li>\n<li><code>message</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> A system-provided human-readable description of the error</li>\n<li><code>path</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> If present, the file path when reporting a file system error</li>\n<li><code>port</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\"><number></a> If present, the network connection port that is not available</li>\n<li><code>syscall</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\"><string></a> The name of the system call that triggered the error</li>\n</ul>",
|
|
4354
4368
|
"properties": [
|
|
4355
4369
|
{
|
|
4356
|
-
"textRaw": "`address` {string}",
|
|
4370
|
+
"textRaw": "`address` Type: {string}",
|
|
4357
4371
|
"type": "string",
|
|
4358
|
-
"name": "
|
|
4372
|
+
"name": "Type",
|
|
4359
4373
|
"desc": "<p>If present, <code>error.address</code> is a string describing the address to which a\nnetwork connection failed.</p>"
|
|
4360
4374
|
},
|
|
4361
4375
|
{
|
|
4362
|
-
"textRaw": "`code` {string}",
|
|
4376
|
+
"textRaw": "`code` Type: {string}",
|
|
4363
4377
|
"type": "string",
|
|
4364
|
-
"name": "
|
|
4378
|
+
"name": "Type",
|
|
4365
4379
|
"desc": "<p>The <code>error.code</code> property is a string representing the error code.</p>"
|
|
4366
4380
|
},
|
|
4367
4381
|
{
|
|
4368
|
-
"textRaw": "`dest` {string}",
|
|
4382
|
+
"textRaw": "`dest` Type: {string}",
|
|
4369
4383
|
"type": "string",
|
|
4370
|
-
"name": "
|
|
4384
|
+
"name": "Type",
|
|
4371
4385
|
"desc": "<p>If present, <code>error.dest</code> is the file path destination when reporting a file\nsystem error.</p>"
|
|
4372
4386
|
},
|
|
4373
4387
|
{
|
|
4374
|
-
"textRaw": "`errno` {number}",
|
|
4388
|
+
"textRaw": "`errno` Type: {number}",
|
|
4375
4389
|
"type": "number",
|
|
4376
|
-
"name": "
|
|
4390
|
+
"name": "Type",
|
|
4377
4391
|
"desc": "<p>The <code>error.errno</code> property is a negative number which corresponds\nto the error code defined in <a href=\"https://docs.libuv.org/en/v1.x/errors.html\"><code>libuv Error handling</code></a>.</p>\n<p>On Windows the error number provided by the system will be normalized by libuv.</p>\n<p>To get the string representation of the error code, use\n<a href=\"util.html#utilgetsystemerrornameerr\"><code>util.getSystemErrorName(error.errno)</code></a>.</p>"
|
|
4378
4392
|
},
|
|
4379
4393
|
{
|
|
4380
|
-
"textRaw": "`info` {Object}",
|
|
4394
|
+
"textRaw": "`info` Type: {Object}",
|
|
4381
4395
|
"type": "Object",
|
|
4382
|
-
"name": "
|
|
4396
|
+
"name": "Type",
|
|
4383
4397
|
"desc": "<p>If present, <code>error.info</code> is an object with details about the error condition.</p>"
|
|
4384
4398
|
},
|
|
4385
4399
|
{
|
|
4386
|
-
"textRaw": "`message` {string}",
|
|
4400
|
+
"textRaw": "`message` Type: {string}",
|
|
4387
4401
|
"type": "string",
|
|
4388
|
-
"name": "
|
|
4402
|
+
"name": "Type",
|
|
4389
4403
|
"desc": "<p><code>error.message</code> is a system-provided human-readable description of the error.</p>"
|
|
4390
4404
|
},
|
|
4391
4405
|
{
|
|
4392
|
-
"textRaw": "`path` {string}",
|
|
4406
|
+
"textRaw": "`path` Type: {string}",
|
|
4393
4407
|
"type": "string",
|
|
4394
|
-
"name": "
|
|
4408
|
+
"name": "Type",
|
|
4395
4409
|
"desc": "<p>If present, <code>error.path</code> is a string containing a relevant invalid pathname.</p>"
|
|
4396
4410
|
},
|
|
4397
4411
|
{
|
|
4398
|
-
"textRaw": "`port` {number}",
|
|
4412
|
+
"textRaw": "`port` Type: {number}",
|
|
4399
4413
|
"type": "number",
|
|
4400
|
-
"name": "
|
|
4414
|
+
"name": "Type",
|
|
4401
4415
|
"desc": "<p>If present, <code>error.port</code> is the network connection port that is not available.</p>"
|
|
4402
4416
|
},
|
|
4403
4417
|
{
|
|
4404
|
-
"textRaw": "`syscall` {string}",
|
|
4418
|
+
"textRaw": "`syscall` Type: {string}",
|
|
4405
4419
|
"type": "string",
|
|
4406
|
-
"name": "
|
|
4420
|
+
"name": "Type",
|
|
4407
4421
|
"desc": "<p>The <code>error.syscall</code> property is a string describing the <a href=\"https://man7.org/linux/man-pages/man2/syscalls.2.html\">syscall</a> that failed.</p>"
|
|
4408
4422
|
}
|
|
4409
4423
|
],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
******************************************************************************/
|
|
14
14
|
|
|
15
|
-
export enum
|
|
15
|
+
export enum NodeErrorCode {
|
|
16
16
|
/**
|
|
17
17
|
* <p>Used when an operation has been aborted (typically using an <code>AbortController</code>).</p>
|
|
18
18
|
* <p>APIs <em>not</em> using <code>AbortSignal</code>s typically do not raise an error with this code.</p>
|
|
@@ -492,8 +492,10 @@ export enum NodeError {
|
|
|
492
492
|
*/
|
|
493
493
|
ERR_FS_EISDIR = 'ERR_FS_EISDIR',
|
|
494
494
|
/**
|
|
495
|
-
* <p>An attempt
|
|
496
|
-
*
|
|
495
|
+
* <p>An attempt was made to read a file larger than the supported 2 GiB limit for
|
|
496
|
+
* <code>fs.readFile()</code>. This is not a limitation of <code>Buffer</code>, but an internal I/O constraint.
|
|
497
|
+
* For handling larger files, consider using <code>fs.createReadStream()</code> to read the
|
|
498
|
+
* file in chunks.</p>
|
|
497
499
|
* <p><a id="ERR_FS_WATCH_QUEUE_OVERFLOW"></a></p>
|
|
498
500
|
*/
|
|
499
501
|
ERR_FS_FILE_TOO_LARGE = 'ERR_FS_FILE_TOO_LARGE',
|
|
@@ -1365,9 +1367,19 @@ export enum NodeError {
|
|
|
1365
1367
|
* <a href="cli.html#--disable-protomode"><code>--disable-proto=throw</code></a>. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf"><code>Object.getPrototypeOf</code></a> and
|
|
1366
1368
|
* <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf"><code>Object.setPrototypeOf</code></a> should be used to get and set the prototype of an
|
|
1367
1369
|
* object.</p>
|
|
1368
|
-
* <p><a id="
|
|
1370
|
+
* <p><a id="ERR_PROXY_INVALID_CONFIG"></a></p>
|
|
1369
1371
|
*/
|
|
1370
1372
|
ERR_PROTO_ACCESS = 'ERR_PROTO_ACCESS',
|
|
1373
|
+
/**
|
|
1374
|
+
* <p>Failed to proxy a request because the proxy configuration is invalid.</p>
|
|
1375
|
+
* <p><a id="ERR_PROXY_TUNNEL"></a></p>
|
|
1376
|
+
*/
|
|
1377
|
+
ERR_PROXY_INVALID_CONFIG = 'ERR_PROXY_INVALID_CONFIG',
|
|
1378
|
+
/**
|
|
1379
|
+
* <p>Failed to establish proxy tunnel when <code>NODE_USE_ENV_PROXY</code> or <code>--use-env-proxy</code> is enabled.</p>
|
|
1380
|
+
* <p><a id="ERR_QUIC_APPLICATION_ERROR"></a></p>
|
|
1381
|
+
*/
|
|
1382
|
+
ERR_PROXY_TUNNEL = 'ERR_PROXY_TUNNEL',
|
|
1371
1383
|
/**
|
|
1372
1384
|
* <p>A QUIC application error occurred.</p>
|
|
1373
1385
|
* <p><a id="ERR_QUIC_CONNECTION_FAILED"></a></p>
|
|
@@ -2415,7 +2427,7 @@ export enum NodeError {
|
|
|
2415
2427
|
ERR_ZLIB_BINDING_CLOSED = 'ERR_ZLIB_BINDING_CLOSED',
|
|
2416
2428
|
}
|
|
2417
2429
|
|
|
2418
|
-
export enum
|
|
2430
|
+
export enum OpenSSLErrorCode {
|
|
2419
2431
|
/**
|
|
2420
2432
|
* <p>The certificate is not yet valid: the notBefore date is after the current time.</p>
|
|
2421
2433
|
* <p><a id="CERT_HAS_EXPIRED"></a></p>
|
|
@@ -33,7 +33,7 @@ export async function generate(context: GenerateContext) {
|
|
|
33
33
|
}
|
|
34
34
|
throw new Error(`missing section: ${id}`);
|
|
35
35
|
}
|
|
36
|
-
content += 'export enum
|
|
36
|
+
content += 'export enum NodeErrorCode {\n';
|
|
37
37
|
for (const err of get_id('node.js_error_codes')) {
|
|
38
38
|
content += line(err.textRaw, err.desc, false);
|
|
39
39
|
}
|
|
@@ -43,7 +43,7 @@ export async function generate(context: GenerateContext) {
|
|
|
43
43
|
}
|
|
44
44
|
content += '}\n\n';
|
|
45
45
|
|
|
46
|
-
content += 'export enum
|
|
46
|
+
content += 'export enum OpenSSLErrorCode {\n';
|
|
47
47
|
for (const section of get_id('openssl_error_codes')) {
|
|
48
48
|
for (const err of (section as any).modules) {
|
|
49
49
|
content += line(err.textRaw, err.desc, false);
|