opticore-catch-exception-error 1.0.15 → 1.0.17
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/dist/index.cjs +479 -390
- package/dist/index.d.cts +80 -256
- package/dist/index.d.ts +80 -256
- package/dist/index.js +474 -354
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30,47 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
AssertionErrors: () => AssertionErrors,
|
|
33
34
|
CErrorName: () => CErrorName,
|
|
34
35
|
CEvent: () => CEvent,
|
|
35
36
|
CEventNameError: () => CEventNameError,
|
|
37
|
+
InternalErrors: () => InternalErrors,
|
|
38
|
+
JavaScriptErrors: () => JavaScriptErrors,
|
|
39
|
+
OpenSSLErrors: () => OpenSSLErrors,
|
|
36
40
|
ServerListenEventError: () => ServerListenEventError,
|
|
37
|
-
StackTraceAssertionError: () => StackTraceAssertionError,
|
|
38
|
-
StackTraceBeforeExit: () => StackTraceBeforeExit,
|
|
39
|
-
StackTraceEACCES: () => StackTraceEACCES,
|
|
40
|
-
StackTraceEADDRINUSE: () => StackTraceEADDRINUSE,
|
|
41
|
-
StackTraceECONNREFUSED: () => StackTraceECONNREFUSED,
|
|
42
|
-
StackTraceECONNRESET: () => StackTraceECONNRESET,
|
|
43
|
-
StackTraceEEXIST: () => StackTraceEEXIST,
|
|
44
|
-
StackTraceEISDIR: () => StackTraceEISDIR,
|
|
45
|
-
StackTraceEMFILE: () => StackTraceEMFILE,
|
|
46
|
-
StackTraceENOENT: () => StackTraceENOENT,
|
|
47
|
-
StackTraceENOTDIR: () => StackTraceENOTDIR,
|
|
48
|
-
StackTraceENOTEMPTY: () => StackTraceENOTEMPTY,
|
|
49
|
-
StackTraceEPERM: () => StackTraceEPERM,
|
|
50
|
-
StackTraceEPIPE: () => StackTraceEPIPE,
|
|
51
|
-
StackTraceERR_HTTP_HEADERS_SENT: () => StackTraceERR_HTTP_HEADERS_SENT,
|
|
52
|
-
StackTraceERR_INVALID_ARG_TYPE: () => StackTraceERR_INVALID_ARG_TYPE,
|
|
53
|
-
StackTraceERR_INVALID_CALLBACK: () => StackTraceERR_INVALID_CALLBACK,
|
|
54
|
-
StackTraceERR_OSSL_BAD_DECRYPT: () => StackTraceERR_OSSL_BAD_DECRYPT,
|
|
55
|
-
StackTraceERR_OSSL_EVP_UNSUPPORTED: () => StackTraceERR_OSSL_EVP_UNSUPPORTED,
|
|
56
|
-
StackTraceERR_OSSL_WRONG_FINAL_BLOCK_LENGTH: () => StackTraceERR_OSSL_WRONG_FINAL_BLOCK_LENGTH,
|
|
57
|
-
StackTraceERR_STREAM_DESTROYED: () => StackTraceERR_STREAM_DESTROYED,
|
|
58
|
-
StackTraceERR_TLS_CERT_ALTNAME_INVALID: () => StackTraceERR_TLS_CERT_ALTNAME_INVALID,
|
|
59
|
-
StackTraceERR_UNSUPPORTED_ESM_URL_SCHEME: () => StackTraceERR_UNSUPPORTED_ESM_URL_SCHEME,
|
|
60
|
-
StackTraceETIMEDOUT: () => StackTraceETIMEDOUT,
|
|
61
41
|
StackTraceError: () => StackTraceError,
|
|
62
|
-
|
|
63
|
-
StackTraceExit: () => StackTraceExit,
|
|
64
|
-
StackTraceGeneralError: () => StackTraceGeneralError,
|
|
65
|
-
StackTraceOpenSSLError: () => StackTraceOpenSSLError,
|
|
66
|
-
StackTraceRangeError: () => StackTraceRangeError,
|
|
67
|
-
StackTraceReferenceError: () => StackTraceReferenceError,
|
|
68
|
-
StackTraceSyntaxError: () => StackTraceSyntaxError,
|
|
69
|
-
StackTraceSystemError: () => StackTraceSystemError,
|
|
70
|
-
StackTraceTypeError: () => StackTraceTypeError,
|
|
71
|
-
StackTraceURIError: () => StackTraceURIError,
|
|
72
|
-
StackTraceUncaughtException: () => StackTraceUncaughtException,
|
|
73
|
-
StackTraceUnhandledRejection: () => StackTraceUnhandledRejection
|
|
42
|
+
SystemErrors: () => SystemErrors
|
|
74
43
|
});
|
|
75
44
|
module.exports = __toCommonJS(index_exports);
|
|
76
45
|
|
|
@@ -146,6 +115,14 @@ var CEventNameError = {
|
|
|
146
115
|
request: "request"
|
|
147
116
|
};
|
|
148
117
|
|
|
118
|
+
// src/core/errors/events/serverListen.event.error.ts
|
|
119
|
+
var import_process = __toESM(require("process"), 1);
|
|
120
|
+
var import_ansi_colors = __toESM(require("ansi-colors"), 1);
|
|
121
|
+
var import_chalk = __toESM(require("chalk"), 1);
|
|
122
|
+
var import_opticore_logger = require("opticore-logger");
|
|
123
|
+
var import_opticore_http_response = require("opticore-http-response");
|
|
124
|
+
var import_opticore_translator2 = require("opticore-translator");
|
|
125
|
+
|
|
149
126
|
// src/core/errors/base/stackTraceError.ts
|
|
150
127
|
var StackTraceError = class extends Error {
|
|
151
128
|
name;
|
|
@@ -168,95 +145,6 @@ var StackTraceError = class extends Error {
|
|
|
168
145
|
}
|
|
169
146
|
};
|
|
170
147
|
|
|
171
|
-
// src/core/errors/stackTraceAssertionError.ts
|
|
172
|
-
var import_opticore_http_response = require("opticore-http-response");
|
|
173
|
-
var StackTraceAssertionError = class extends StackTraceError {
|
|
174
|
-
constructor(message) {
|
|
175
|
-
super(message, CErrorName.assertionError, import_opticore_http_response.HttpStatusCode.INTERNAL_SERVER_ERROR, true);
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// src/core/errors/stackTraceEvalError.ts
|
|
180
|
-
var import_opticore_http_response2 = require("opticore-http-response");
|
|
181
|
-
var StackTraceEvalError = class extends StackTraceError {
|
|
182
|
-
constructor(message) {
|
|
183
|
-
super(message, CErrorName.evalError, import_opticore_http_response2.HttpStatusCode.BAD_REQUEST, true);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// src/core/errors/stackTraceGeneralError.ts
|
|
188
|
-
var import_opticore_http_response3 = require("opticore-http-response");
|
|
189
|
-
var StackTraceGeneralError = class extends StackTraceError {
|
|
190
|
-
constructor(message) {
|
|
191
|
-
super(message, CErrorName.generalError, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR, false);
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// src/core/errors/stackTraceOpenSSLError.ts
|
|
196
|
-
var import_opticore_http_response4 = require("opticore-http-response");
|
|
197
|
-
var StackTraceOpenSSLError = class extends StackTraceError {
|
|
198
|
-
constructor(message) {
|
|
199
|
-
super(message, CErrorName.openSSLError, import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR, false);
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
// src/core/errors/stackTraceRangeError.ts
|
|
204
|
-
var import_opticore_http_response5 = require("opticore-http-response");
|
|
205
|
-
var StackTraceRangeError = class extends StackTraceError {
|
|
206
|
-
constructor(message) {
|
|
207
|
-
super(message, CErrorName.rangeError, import_opticore_http_response5.HttpStatusCode.BAD_REQUEST, true);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// src/core/errors/stackTraceReferenceError.ts
|
|
212
|
-
var import_opticore_http_response6 = require("opticore-http-response");
|
|
213
|
-
var StackTraceReferenceError = class extends StackTraceError {
|
|
214
|
-
constructor(message) {
|
|
215
|
-
super(message, CErrorName.referenceError, import_opticore_http_response6.HttpStatusCode.BAD_REQUEST, true);
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
// src/core/errors/stackTraceSyntaxError.ts
|
|
220
|
-
var import_opticore_http_response7 = require("opticore-http-response");
|
|
221
|
-
var StackTraceSyntaxError = class extends StackTraceError {
|
|
222
|
-
constructor(message) {
|
|
223
|
-
super(message, CErrorName.syntaxError, import_opticore_http_response7.HttpStatusCode.BAD_REQUEST, true);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
// src/core/errors/stackTraceSystemError.ts
|
|
228
|
-
var import_opticore_http_response8 = require("opticore-http-response");
|
|
229
|
-
var StackTraceSystemError = class extends StackTraceError {
|
|
230
|
-
constructor(message, code) {
|
|
231
|
-
super(message, CErrorName.systemError, import_opticore_http_response8.HttpStatusCode.INTERNAL_SERVER_ERROR, false);
|
|
232
|
-
this.message = `${message} (code: ${code})`;
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
// src/core/errors/stackTraceTypeError.ts
|
|
237
|
-
var import_opticore_http_response9 = require("opticore-http-response");
|
|
238
|
-
var StackTraceTypeError = class extends StackTraceError {
|
|
239
|
-
constructor(message) {
|
|
240
|
-
super(message, CErrorName.typeError, import_opticore_http_response9.HttpStatusCode.BAD_REQUEST, true);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
// src/core/errors/stackTraceURIError.ts
|
|
245
|
-
var import_opticore_http_response10 = require("opticore-http-response");
|
|
246
|
-
var StackTraceURIError = class extends StackTraceError {
|
|
247
|
-
constructor(message) {
|
|
248
|
-
super(message, CErrorName.uriError, import_opticore_http_response10.HttpStatusCode.BAD_REQUEST, true);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
// src/core/errors/events/serverListen.event.error.ts
|
|
253
|
-
var import_process = __toESM(require("process"), 1);
|
|
254
|
-
var import_ansi_colors = __toESM(require("ansi-colors"), 1);
|
|
255
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
256
|
-
var import_opticore_logger = require("opticore-logger");
|
|
257
|
-
var import_opticore_http_response11 = require("opticore-http-response");
|
|
258
|
-
var import_opticore_translator2 = require("opticore-translator");
|
|
259
|
-
|
|
260
148
|
// src/utils/dateTimeFormatted.utils.ts
|
|
261
149
|
var dateTimeFormatted = `${(/* @__PURE__ */ new Date()).getMonth()}-${(/* @__PURE__ */ new Date()).getDate()}-${(/* @__PURE__ */ new Date()).getFullYear()} ${(/* @__PURE__ */ new Date()).getHours()}:${(/* @__PURE__ */ new Date()).getMinutes()}:${(/* @__PURE__ */ new Date()).getSeconds()}`;
|
|
262
150
|
|
|
@@ -264,11 +152,11 @@ var dateTimeFormatted = `${(/* @__PURE__ */ new Date()).getMonth()}-${(/* @__PUR
|
|
|
264
152
|
var import_path = __toESM(require("path"), 1);
|
|
265
153
|
var import_module = require("module");
|
|
266
154
|
var import_opticore_translator = require("opticore-translator");
|
|
267
|
-
var translateCatchExceptionErrorLanguageLoader = (
|
|
155
|
+
var translateCatchExceptionErrorLanguageLoader = () => {
|
|
268
156
|
const require2 = (0, import_module.createRequire)(importMetaUrl);
|
|
269
157
|
const packagePath = import_path.default.dirname(require2.resolve("opticore-catch-exception-error"));
|
|
270
158
|
const translateMsgJsonFilePath = import_path.default.join(packagePath, "utils", "translations");
|
|
271
|
-
import_opticore_translator.TranslationLoader.loadTranslations(translateMsgJsonFilePath
|
|
159
|
+
import_opticore_translator.TranslationLoader.loadTranslations(translateMsgJsonFilePath);
|
|
272
160
|
};
|
|
273
161
|
|
|
274
162
|
// src/core/errors/events/serverListen.event.error.ts
|
|
@@ -278,7 +166,7 @@ var ServerListenEventError = class {
|
|
|
278
166
|
localeLanguage;
|
|
279
167
|
constructor(defaultLocalLang) {
|
|
280
168
|
this.localeLanguage = defaultLocalLang;
|
|
281
|
-
translateCatchExceptionErrorLanguageLoader(
|
|
169
|
+
translateCatchExceptionErrorLanguageLoader();
|
|
282
170
|
}
|
|
283
171
|
/**
|
|
284
172
|
* @param appPort
|
|
@@ -288,14 +176,14 @@ var ServerListenEventError = class {
|
|
|
288
176
|
this.stackTrace = this.traceError(
|
|
289
177
|
import_opticore_translator2.TranslationLoader.t("errorHostUrl", this.localeLanguage),
|
|
290
178
|
import_opticore_translator2.TranslationLoader.t("listening", this.localeLanguage),
|
|
291
|
-
|
|
179
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
292
180
|
);
|
|
293
181
|
this.logger.error(
|
|
294
182
|
this.stackTrace.message,
|
|
295
183
|
import_opticore_translator2.TranslationLoader.t("webServer", this.localeLanguage),
|
|
296
184
|
import_opticore_translator2.TranslationLoader.t("badPort", this.localeLanguage, { badPort: appPort }),
|
|
297
185
|
this.stackTrace.stack,
|
|
298
|
-
|
|
186
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
299
187
|
);
|
|
300
188
|
import_process.default.exit();
|
|
301
189
|
}
|
|
@@ -307,14 +195,14 @@ var ServerListenEventError = class {
|
|
|
307
195
|
this.stackTrace = this.traceError(
|
|
308
196
|
import_opticore_translator2.TranslationLoader.t("badHost", this.localeLanguage, { badHost: appHost }),
|
|
309
197
|
import_opticore_translator2.TranslationLoader.t("listening", this.localeLanguage),
|
|
310
|
-
|
|
198
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
311
199
|
);
|
|
312
200
|
this.logger.error(
|
|
313
201
|
this.stackTrace.message,
|
|
314
202
|
import_opticore_translator2.TranslationLoader.t("webServer", this.localeLanguage),
|
|
315
203
|
import_opticore_translator2.TranslationLoader.t("badHost", this.localeLanguage),
|
|
316
204
|
this.stackTrace.stack,
|
|
317
|
-
|
|
205
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
318
206
|
);
|
|
319
207
|
import_process.default.exit();
|
|
320
208
|
}
|
|
@@ -325,14 +213,14 @@ var ServerListenEventError = class {
|
|
|
325
213
|
this.stackTrace = this.traceError(
|
|
326
214
|
import_opticore_translator2.TranslationLoader.t("badPort", this.localeLanguage),
|
|
327
215
|
import_opticore_translator2.TranslationLoader.t("listening", this.localeLanguage),
|
|
328
|
-
|
|
216
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
329
217
|
);
|
|
330
218
|
this.logger.error(
|
|
331
219
|
this.stackTrace.message,
|
|
332
220
|
import_opticore_translator2.TranslationLoader.t("webServer", this.localeLanguage),
|
|
333
221
|
import_opticore_translator2.TranslationLoader.t("badHost", this.localeLanguage),
|
|
334
222
|
this.stackTrace.stack,
|
|
335
|
-
|
|
223
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
336
224
|
);
|
|
337
225
|
import_process.default.exit();
|
|
338
226
|
}
|
|
@@ -346,7 +234,7 @@ var ServerListenEventError = class {
|
|
|
346
234
|
import_opticore_translator2.TranslationLoader.t("serverStart", this.localeLanguage),
|
|
347
235
|
import_opticore_translator2.TranslationLoader.t("serverStartError", this.localeLanguage, { err }),
|
|
348
236
|
err.stack,
|
|
349
|
-
|
|
237
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
350
238
|
);
|
|
351
239
|
}
|
|
352
240
|
/**
|
|
@@ -357,14 +245,14 @@ var ServerListenEventError = class {
|
|
|
357
245
|
this.stackTrace = this.traceError(
|
|
358
246
|
error.message,
|
|
359
247
|
error.name,
|
|
360
|
-
|
|
248
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
361
249
|
);
|
|
362
250
|
this.logger.error(
|
|
363
251
|
this.stackTrace.message,
|
|
364
252
|
"Event error",
|
|
365
253
|
"Error",
|
|
366
254
|
error.stack,
|
|
367
|
-
|
|
255
|
+
import_opticore_http_response.HttpStatusCode.BAD_REQUEST
|
|
368
256
|
);
|
|
369
257
|
}
|
|
370
258
|
/**
|
|
@@ -375,14 +263,14 @@ var ServerListenEventError = class {
|
|
|
375
263
|
this.stackTrace = this.traceError(
|
|
376
264
|
import_opticore_translator2.TranslationLoader.t("processExitCode", this.localeLanguage, { processExitCode: code }),
|
|
377
265
|
import_opticore_translator2.TranslationLoader.t("beforeExit", this.localeLanguage),
|
|
378
|
-
|
|
266
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
379
267
|
);
|
|
380
268
|
this.logger.error(
|
|
381
269
|
this.stackTrace.message,
|
|
382
270
|
import_opticore_translator2.TranslationLoader.t("beforeExit", this.localeLanguage),
|
|
383
271
|
import_opticore_translator2.TranslationLoader.t("processBeforeExit", this.localeLanguage),
|
|
384
272
|
this.stackTrace.stack,
|
|
385
|
-
|
|
273
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
386
274
|
);
|
|
387
275
|
import_process.default.exit(code);
|
|
388
276
|
}
|
|
@@ -393,14 +281,14 @@ var ServerListenEventError = class {
|
|
|
393
281
|
this.stackTrace = this.traceError(
|
|
394
282
|
import_opticore_translator2.TranslationLoader.t("childProcessDiscon", this.localeLanguage),
|
|
395
283
|
import_opticore_translator2.TranslationLoader.t("processDiscon", this.localeLanguage),
|
|
396
|
-
|
|
284
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
397
285
|
);
|
|
398
286
|
this.logger.error(
|
|
399
287
|
this.stackTrace.message,
|
|
400
288
|
import_opticore_translator2.TranslationLoader.t("disconnected", this.localeLanguage),
|
|
401
289
|
import_opticore_translator2.TranslationLoader.t("processDiscon", this.localeLanguage),
|
|
402
290
|
this.stackTrace.stack,
|
|
403
|
-
|
|
291
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
404
292
|
);
|
|
405
293
|
import_process.default.exit();
|
|
406
294
|
}
|
|
@@ -426,154 +314,154 @@ var ServerListenEventError = class {
|
|
|
426
314
|
this.stackTrace = this.traceError(
|
|
427
315
|
import_opticore_translator2.TranslationLoader.t("somethingWentWrong", this.localeLanguage),
|
|
428
316
|
import_opticore_translator2.TranslationLoader.t("genErrors", this.localeLanguage),
|
|
429
|
-
|
|
317
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
430
318
|
);
|
|
431
319
|
this.logger.error(
|
|
432
320
|
this.stackTrace.message,
|
|
433
321
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
434
322
|
"General Errors",
|
|
435
323
|
this.stackTrace.stack,
|
|
436
|
-
|
|
324
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
437
325
|
);
|
|
438
326
|
break;
|
|
439
327
|
case 2:
|
|
440
328
|
this.stackTrace = this.traceError(
|
|
441
329
|
import_opticore_translator2.TranslationLoader.t("incorrectCmd", this.localeLanguage),
|
|
442
330
|
import_opticore_translator2.TranslationLoader.t("misuseShell", this.localeLanguage),
|
|
443
|
-
|
|
331
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
444
332
|
);
|
|
445
333
|
this.logger.error(
|
|
446
334
|
this.stackTrace.message,
|
|
447
335
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
448
336
|
import_opticore_translator2.TranslationLoader.t("incorrectCmd", this.localeLanguage),
|
|
449
337
|
this.stackTrace.stack,
|
|
450
|
-
|
|
338
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
451
339
|
);
|
|
452
340
|
break;
|
|
453
341
|
case 126:
|
|
454
342
|
this.stackTrace = this.traceError(
|
|
455
343
|
import_opticore_translator2.TranslationLoader.t("incorrectCmd", this.localeLanguage),
|
|
456
344
|
import_opticore_translator2.TranslationLoader.t("cmdNotExecutable", this.localeLanguage),
|
|
457
|
-
|
|
345
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
458
346
|
);
|
|
459
347
|
this.logger.error(
|
|
460
348
|
this.stackTrace.message,
|
|
461
349
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
462
350
|
this.stackTrace.name,
|
|
463
351
|
this.stackTrace.stack,
|
|
464
|
-
|
|
352
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
465
353
|
);
|
|
466
354
|
break;
|
|
467
355
|
case 127:
|
|
468
356
|
this.stackTrace = this.traceError(
|
|
469
357
|
import_opticore_translator2.TranslationLoader.t("cmdNotFound", this.localeLanguage),
|
|
470
358
|
import_opticore_translator2.TranslationLoader.t("cmdNotFoundInSystemPath", this.localeLanguage),
|
|
471
|
-
|
|
359
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
472
360
|
);
|
|
473
361
|
this.logger.error(
|
|
474
362
|
this.stackTrace.message,
|
|
475
363
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
476
364
|
this.stackTrace.name,
|
|
477
365
|
this.stackTrace.stack,
|
|
478
|
-
|
|
366
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
479
367
|
);
|
|
480
368
|
break;
|
|
481
369
|
case 128:
|
|
482
370
|
this.stackTrace = this.traceError(
|
|
483
371
|
import_opticore_translator2.TranslationLoader.t("cmdNotFoundInSystemPath", this.localeLanguage),
|
|
484
372
|
import_opticore_translator2.TranslationLoader.t("argInvalid", this.localeLanguage),
|
|
485
|
-
|
|
373
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
486
374
|
);
|
|
487
375
|
this.logger.error(
|
|
488
376
|
this.stackTrace.message,
|
|
489
377
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
490
378
|
this.stackTrace.name,
|
|
491
379
|
this.stackTrace.stack,
|
|
492
|
-
|
|
380
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
493
381
|
);
|
|
494
382
|
break;
|
|
495
383
|
case 130:
|
|
496
384
|
this.stackTrace = this.traceError(
|
|
497
385
|
import_opticore_translator2.TranslationLoader.t("scriptEndedManuallyByCtrlC", this.localeLanguage),
|
|
498
386
|
import_opticore_translator2.TranslationLoader.t("scriptEnded", this.localeLanguage),
|
|
499
|
-
|
|
387
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
500
388
|
);
|
|
501
389
|
this.logger.error(
|
|
502
390
|
this.stackTrace.message,
|
|
503
391
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
504
392
|
this.stackTrace.name,
|
|
505
393
|
this.stackTrace.stack,
|
|
506
|
-
|
|
394
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
507
395
|
);
|
|
508
396
|
break;
|
|
509
397
|
case 137:
|
|
510
398
|
this.stackTrace = this.traceError(
|
|
511
399
|
import_opticore_translator2.TranslationLoader.t("processEndedBySIGKILL", this.localeLanguage),
|
|
512
400
|
"SIGKILL",
|
|
513
|
-
|
|
401
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
514
402
|
);
|
|
515
403
|
this.logger.error(
|
|
516
404
|
this.stackTrace.message,
|
|
517
405
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
518
406
|
this.stackTrace.name,
|
|
519
407
|
this.stackTrace.stack,
|
|
520
|
-
|
|
408
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
521
409
|
);
|
|
522
410
|
break;
|
|
523
411
|
case 139:
|
|
524
412
|
this.stackTrace = this.traceError(
|
|
525
413
|
import_opticore_translator2.TranslationLoader.t("accessProcessIllegally", this.localeLanguage),
|
|
526
414
|
import_opticore_translator2.TranslationLoader.t("defaultSegment", this.localeLanguage),
|
|
527
|
-
|
|
415
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
528
416
|
);
|
|
529
417
|
this.logger.error(
|
|
530
418
|
this.stackTrace.message,
|
|
531
419
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
532
420
|
this.stackTrace.name,
|
|
533
421
|
this.stackTrace.stack,
|
|
534
|
-
|
|
422
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
535
423
|
);
|
|
536
424
|
break;
|
|
537
425
|
case 143:
|
|
538
426
|
this.stackTrace = this.traceError(
|
|
539
427
|
import_opticore_translator2.TranslationLoader.t("processReceivedSigtermSignal", this.localeLanguage),
|
|
540
428
|
import_opticore_translator2.TranslationLoader.t("processReceived", this.localeLanguage),
|
|
541
|
-
|
|
429
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
542
430
|
);
|
|
543
431
|
this.logger.error(
|
|
544
432
|
this.stackTrace.message,
|
|
545
433
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
546
434
|
this.stackTrace.name,
|
|
547
435
|
this.stackTrace.stack,
|
|
548
|
-
|
|
436
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
549
437
|
);
|
|
550
438
|
break;
|
|
551
439
|
case 255:
|
|
552
440
|
this.stackTrace = this.traceError(
|
|
553
441
|
import_opticore_translator2.TranslationLoader.t("exitCode", this.localeLanguage),
|
|
554
442
|
import_opticore_translator2.TranslationLoader.t("outRange", this.localeLanguage),
|
|
555
|
-
|
|
443
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
556
444
|
);
|
|
557
445
|
this.logger.error(
|
|
558
446
|
this.stackTrace.message,
|
|
559
447
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
560
448
|
this.stackTrace.name,
|
|
561
449
|
this.stackTrace.stack,
|
|
562
|
-
|
|
450
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
563
451
|
);
|
|
564
452
|
break;
|
|
565
453
|
default:
|
|
566
454
|
this.stackTrace = this.traceError(
|
|
567
455
|
import_opticore_translator2.TranslationLoader.t("errorOccurring", this.localeLanguage),
|
|
568
456
|
import_opticore_translator2.TranslationLoader.t("errors", this.localeLanguage),
|
|
569
|
-
|
|
457
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
570
458
|
);
|
|
571
459
|
this.logger.error(
|
|
572
460
|
this.stackTrace.message,
|
|
573
461
|
import_opticore_translator2.TranslationLoader.t("exited", this.localeLanguage),
|
|
574
462
|
this.stackTrace.name,
|
|
575
463
|
this.stackTrace.stack,
|
|
576
|
-
|
|
464
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
577
465
|
);
|
|
578
466
|
break;
|
|
579
467
|
}
|
|
@@ -587,14 +475,14 @@ var ServerListenEventError = class {
|
|
|
587
475
|
this.stackTrace = this.traceError(
|
|
588
476
|
import_opticore_translator2.TranslationLoader.t("promise", this.localeLanguage, { promise }),
|
|
589
477
|
import_opticore_translator2.TranslationLoader.t("rejectionPromise", this.localeLanguage, { promise }),
|
|
590
|
-
|
|
478
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
591
479
|
);
|
|
592
480
|
this.logger.error(
|
|
593
481
|
this.stackTrace.message,
|
|
594
482
|
"PromiseRejectionHandled",
|
|
595
483
|
this.stackTrace.name,
|
|
596
484
|
this.stackTrace.stack,
|
|
597
|
-
|
|
485
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
598
486
|
);
|
|
599
487
|
} catch (err) {
|
|
600
488
|
}
|
|
@@ -610,14 +498,14 @@ var ServerListenEventError = class {
|
|
|
610
498
|
this.stackTrace = this.traceError(
|
|
611
499
|
import_opticore_translator2.TranslationLoader.t(error.message, this.localeLanguage, { error: error.stack }),
|
|
612
500
|
import_opticore_translator2.TranslationLoader.t("uncaughtExceptionHandled", this.localeLanguage),
|
|
613
|
-
|
|
501
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
614
502
|
);
|
|
615
503
|
this.logger.error(
|
|
616
504
|
this.stackTrace.message,
|
|
617
505
|
"UncaughtException",
|
|
618
506
|
this.stackTrace.name,
|
|
619
507
|
this.stackTrace.stack,
|
|
620
|
-
|
|
508
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
621
509
|
);
|
|
622
510
|
}
|
|
623
511
|
}
|
|
@@ -639,14 +527,14 @@ var ServerListenEventError = class {
|
|
|
639
527
|
this.stackTrace = this.traceError(
|
|
640
528
|
import_opticore_translator2.TranslationLoader.t("unhandledRejectionAtPromise", this.localeLanguage, { promise, reason }),
|
|
641
529
|
import_opticore_translator2.TranslationLoader.t("unhandledRejection", this.localeLanguage, { promise, reason }),
|
|
642
|
-
|
|
530
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
643
531
|
);
|
|
644
532
|
this.logger.error(
|
|
645
533
|
this.stackTrace.message,
|
|
646
534
|
"UnhandledRejection",
|
|
647
535
|
this.stackTrace.name,
|
|
648
536
|
this.stackTrace.stack,
|
|
649
|
-
|
|
537
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
650
538
|
);
|
|
651
539
|
}
|
|
652
540
|
/**
|
|
@@ -657,14 +545,14 @@ var ServerListenEventError = class {
|
|
|
657
545
|
this.stackTrace = this.traceError(
|
|
658
546
|
import_opticore_translator2.TranslationLoader.t(warning.message, this.localeLanguage),
|
|
659
547
|
"warning",
|
|
660
|
-
|
|
548
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
661
549
|
);
|
|
662
550
|
this.logger.error(
|
|
663
551
|
this.stackTrace.message,
|
|
664
552
|
import_opticore_translator2.TranslationLoader.t("warning", this.localeLanguage, { warning }),
|
|
665
553
|
this.stackTrace.name,
|
|
666
554
|
this.stackTrace.stack,
|
|
667
|
-
|
|
555
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
668
556
|
);
|
|
669
557
|
}
|
|
670
558
|
/**
|
|
@@ -675,14 +563,14 @@ var ServerListenEventError = class {
|
|
|
675
563
|
this.stackTrace = this.traceError(
|
|
676
564
|
import_opticore_translator2.TranslationLoader.t("processGotMsg", this.localeLanguage, { message }),
|
|
677
565
|
import_opticore_translator2.TranslationLoader.t("msgException", this.localeLanguage, { message }),
|
|
678
|
-
|
|
566
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
679
567
|
);
|
|
680
568
|
this.logger.error(
|
|
681
569
|
this.stackTrace.message,
|
|
682
570
|
"Message",
|
|
683
571
|
this.stackTrace.name,
|
|
684
572
|
this.stackTrace.stack,
|
|
685
|
-
|
|
573
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
686
574
|
);
|
|
687
575
|
}
|
|
688
576
|
/**
|
|
@@ -695,14 +583,14 @@ var ServerListenEventError = class {
|
|
|
695
583
|
this.stackTrace = this.traceError(
|
|
696
584
|
import_opticore_translator2.TranslationLoader.t("promiseReason", this.localeLanguage, { promise, reason }),
|
|
697
585
|
import_opticore_translator2.TranslationLoader.t("multipleResolvesDetected", this.localeLanguage, { type, promise, reason }),
|
|
698
|
-
|
|
586
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
699
587
|
);
|
|
700
588
|
this.logger.error(
|
|
701
589
|
this.stackTrace.message,
|
|
702
590
|
"multipleResolves",
|
|
703
591
|
this.stackTrace.name,
|
|
704
592
|
this.stackTrace.stack,
|
|
705
|
-
|
|
593
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
706
594
|
);
|
|
707
595
|
}
|
|
708
596
|
/**
|
|
@@ -723,14 +611,14 @@ var ServerListenEventError = class {
|
|
|
723
611
|
this.stackTrace = this.traceError(
|
|
724
612
|
import_opticore_translator2.TranslationLoader.t("processPIDReceivedSignal", this.localeLanguage, { signal: signal.toString() }),
|
|
725
613
|
"SIGTERM",
|
|
726
|
-
|
|
614
|
+
import_opticore_http_response.HttpStatusCode.NOT_ACCEPTABLE
|
|
727
615
|
);
|
|
728
616
|
this.logger.error(
|
|
729
617
|
this.stackTrace.message,
|
|
730
618
|
"SIGTERM",
|
|
731
619
|
this.stackTrace.name,
|
|
732
620
|
this.stackTrace.stack,
|
|
733
|
-
|
|
621
|
+
import_opticore_http_response.HttpStatusCode.NOT_ACCEPTABLE
|
|
734
622
|
);
|
|
735
623
|
import_process.default.exit(0);
|
|
736
624
|
}
|
|
@@ -767,278 +655,479 @@ var ServerListenEventError = class {
|
|
|
767
655
|
"response status",
|
|
768
656
|
import_opticore_translator2.TranslationLoader.t("respndNotFunc", this.localeLanguage, { err }),
|
|
769
657
|
err.stack,
|
|
770
|
-
|
|
658
|
+
import_opticore_http_response.HttpStatusCode.NOT_ACCEPTABLE
|
|
771
659
|
);
|
|
772
660
|
}
|
|
773
661
|
this.stackTrace = this.traceError(
|
|
774
662
|
err.message,
|
|
775
663
|
import_opticore_translator2.TranslationLoader.t("expressError", this.localeLanguage, { err }),
|
|
776
|
-
|
|
664
|
+
import_opticore_http_response.HttpStatusCode.NOT_ACCEPTABLE
|
|
777
665
|
);
|
|
778
666
|
this.logger.error(
|
|
779
667
|
this.stackTrace.message,
|
|
780
668
|
import_opticore_translator2.TranslationLoader.t("expressErrorHandlingMiddleware", this.localeLanguage, { err }),
|
|
781
669
|
this.stackTrace.name,
|
|
782
670
|
this.stackTrace.stack,
|
|
783
|
-
|
|
671
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
784
672
|
);
|
|
785
673
|
} else {
|
|
786
674
|
next();
|
|
787
675
|
}
|
|
788
676
|
}
|
|
789
|
-
traceError(props, name,
|
|
790
|
-
return new StackTraceError(props, name,
|
|
677
|
+
traceError(props, name, status7) {
|
|
678
|
+
return new StackTraceError(props, name, status7, true);
|
|
791
679
|
}
|
|
792
680
|
};
|
|
793
681
|
|
|
794
|
-
// src/core/errors/
|
|
795
|
-
var
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
|
|
682
|
+
// src/core/errors/javaScript/javaScriptErrors.ts
|
|
683
|
+
var import_opticore_logger2 = require("opticore-logger");
|
|
684
|
+
var import_opticore_http_response2 = require("opticore-http-response");
|
|
685
|
+
var import_opticore_translator3 = require("opticore-translator");
|
|
686
|
+
var JavaScriptErrors = class {
|
|
687
|
+
logger = new import_opticore_logger2.LoggerCore();
|
|
688
|
+
stackTrace;
|
|
689
|
+
localLanguage;
|
|
690
|
+
constructor(defaultLocalLang) {
|
|
691
|
+
this.localLanguage = defaultLocalLang;
|
|
799
692
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
693
|
+
allError(error) {
|
|
694
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
695
|
+
this.logger.error(
|
|
696
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
697
|
+
"Error",
|
|
698
|
+
this.stackTrace.name,
|
|
699
|
+
this.stackTrace.stack,
|
|
700
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
701
|
+
);
|
|
807
702
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
703
|
+
evalError(error) {
|
|
704
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
705
|
+
this.logger.error(
|
|
706
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
707
|
+
"EvalError",
|
|
708
|
+
this.stackTrace.name,
|
|
709
|
+
this.stackTrace.stack,
|
|
710
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
711
|
+
);
|
|
815
712
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
713
|
+
rangeError(error) {
|
|
714
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
715
|
+
this.logger.error(
|
|
716
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
717
|
+
"RangeError",
|
|
718
|
+
this.stackTrace.name,
|
|
719
|
+
this.stackTrace.stack,
|
|
720
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
721
|
+
);
|
|
823
722
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
723
|
+
referenceError(error) {
|
|
724
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
725
|
+
this.logger.error(
|
|
726
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
727
|
+
"ReferenceError",
|
|
728
|
+
this.stackTrace.name,
|
|
729
|
+
this.stackTrace.stack,
|
|
730
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
731
|
+
);
|
|
831
732
|
}
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
733
|
+
syntaxError(error) {
|
|
734
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
735
|
+
this.logger.error(
|
|
736
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
737
|
+
"SyntaxError",
|
|
738
|
+
this.stackTrace.name,
|
|
739
|
+
this.stackTrace.stack,
|
|
740
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
741
|
+
);
|
|
839
742
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
743
|
+
typeError(error) {
|
|
744
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
745
|
+
this.logger.error(
|
|
746
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
747
|
+
"TypeError",
|
|
748
|
+
this.stackTrace.name,
|
|
749
|
+
this.stackTrace.stack,
|
|
750
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
751
|
+
);
|
|
847
752
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
753
|
+
uRIError(error) {
|
|
754
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
755
|
+
this.logger.error(
|
|
756
|
+
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
757
|
+
"URIError",
|
|
758
|
+
this.stackTrace.name,
|
|
759
|
+
this.stackTrace.stack,
|
|
760
|
+
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
761
|
+
);
|
|
855
762
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
// src/core/errors/stackTraceENOTDIR.ts
|
|
859
|
-
var import_opticore_http_response20 = require("opticore-http-response");
|
|
860
|
-
var StackTraceENOTDIR = class extends StackTraceError {
|
|
861
|
-
constructor(message) {
|
|
862
|
-
super(message, CErrorName.enotdir, import_opticore_http_response20.HttpStatusCode.INTERNAL_SERVER_ERROR, true);
|
|
763
|
+
traceError(props, name, status7) {
|
|
764
|
+
return new StackTraceError(props, name, status7, true);
|
|
863
765
|
}
|
|
864
766
|
};
|
|
865
767
|
|
|
866
|
-
// src/core/errors/
|
|
867
|
-
var
|
|
868
|
-
var
|
|
869
|
-
|
|
870
|
-
|
|
768
|
+
// src/core/errors/system/systemErrors.ts
|
|
769
|
+
var import_opticore_logger3 = require("opticore-logger");
|
|
770
|
+
var import_opticore_http_response3 = require("opticore-http-response");
|
|
771
|
+
var import_opticore_translator4 = require("opticore-translator");
|
|
772
|
+
var SystemErrors = class {
|
|
773
|
+
logger = new import_opticore_logger3.LoggerCore();
|
|
774
|
+
stackTrace;
|
|
775
|
+
localLanguage;
|
|
776
|
+
constructor(defaultLocalLang) {
|
|
777
|
+
this.localLanguage = defaultLocalLang;
|
|
871
778
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
779
|
+
eAcces(error) {
|
|
780
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
781
|
+
this.logger.error(
|
|
782
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
783
|
+
"EACCES",
|
|
784
|
+
this.stackTrace.name,
|
|
785
|
+
this.stackTrace.stack,
|
|
786
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
787
|
+
);
|
|
879
788
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
789
|
+
eAddrInUse(error) {
|
|
790
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
791
|
+
this.logger.error(
|
|
792
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
793
|
+
"EADDRINUSE",
|
|
794
|
+
this.stackTrace.name,
|
|
795
|
+
this.stackTrace.stack,
|
|
796
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
797
|
+
);
|
|
887
798
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
799
|
+
eConnRefused(error) {
|
|
800
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
801
|
+
this.logger.error(
|
|
802
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
803
|
+
"ECONNREFUSED",
|
|
804
|
+
this.stackTrace.name,
|
|
805
|
+
this.stackTrace.stack,
|
|
806
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
807
|
+
);
|
|
895
808
|
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
809
|
+
eConnReset(error) {
|
|
810
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
811
|
+
this.logger.error(
|
|
812
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
813
|
+
"ECONNRESET",
|
|
814
|
+
this.stackTrace.name,
|
|
815
|
+
this.stackTrace.stack,
|
|
816
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
817
|
+
);
|
|
903
818
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
819
|
+
eExist(error) {
|
|
820
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
821
|
+
this.logger.error(
|
|
822
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
823
|
+
"EEXIST",
|
|
824
|
+
this.stackTrace.name,
|
|
825
|
+
this.stackTrace.stack,
|
|
826
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
827
|
+
);
|
|
911
828
|
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
829
|
+
eIsDir(error) {
|
|
830
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
831
|
+
this.logger.error(
|
|
832
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
833
|
+
"EISDIR",
|
|
834
|
+
this.stackTrace.name,
|
|
835
|
+
this.stackTrace.stack,
|
|
836
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
837
|
+
);
|
|
919
838
|
}
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
839
|
+
eMFile(error) {
|
|
840
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
841
|
+
this.logger.error(
|
|
842
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
843
|
+
"EMFILE",
|
|
844
|
+
this.stackTrace.name,
|
|
845
|
+
this.stackTrace.stack,
|
|
846
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
847
|
+
);
|
|
927
848
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
849
|
+
eNoEnt(error) {
|
|
850
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
851
|
+
this.logger.error(
|
|
852
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
853
|
+
"ENOENT",
|
|
854
|
+
this.stackTrace.name,
|
|
855
|
+
this.stackTrace.stack,
|
|
856
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
857
|
+
);
|
|
935
858
|
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
859
|
+
eNotDir(error) {
|
|
860
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
861
|
+
this.logger.error(
|
|
862
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
863
|
+
"ENOTDIR",
|
|
864
|
+
this.stackTrace.name,
|
|
865
|
+
this.stackTrace.stack,
|
|
866
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
867
|
+
);
|
|
943
868
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
869
|
+
eNotEmpty(error) {
|
|
870
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
871
|
+
this.logger.error(
|
|
872
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
873
|
+
"ENOTEMPTY",
|
|
874
|
+
this.stackTrace.name,
|
|
875
|
+
this.stackTrace.stack,
|
|
876
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
877
|
+
);
|
|
951
878
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
879
|
+
ePerm(error) {
|
|
880
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
881
|
+
this.logger.error(
|
|
882
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
883
|
+
"EPERM",
|
|
884
|
+
this.stackTrace.name,
|
|
885
|
+
this.stackTrace.stack,
|
|
886
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
887
|
+
);
|
|
959
888
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
889
|
+
ePipe(error) {
|
|
890
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
891
|
+
this.logger.error(
|
|
892
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
893
|
+
"EPIPE",
|
|
894
|
+
this.stackTrace.name,
|
|
895
|
+
this.stackTrace.stack,
|
|
896
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
897
|
+
);
|
|
967
898
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
899
|
+
eTimedOut(error) {
|
|
900
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
901
|
+
this.logger.error(
|
|
902
|
+
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
903
|
+
"ETIMEDOUT",
|
|
904
|
+
this.stackTrace.name,
|
|
905
|
+
this.stackTrace.stack,
|
|
906
|
+
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
traceError(props, name, status7) {
|
|
910
|
+
return new StackTraceError(props, name, status7, true);
|
|
975
911
|
}
|
|
976
912
|
};
|
|
977
913
|
|
|
978
|
-
// src/core/errors/
|
|
979
|
-
var
|
|
980
|
-
var
|
|
981
|
-
|
|
982
|
-
|
|
914
|
+
// src/core/errors/openSSL/openSSLErrors.ts
|
|
915
|
+
var import_opticore_logger4 = require("opticore-logger");
|
|
916
|
+
var import_opticore_http_response4 = require("opticore-http-response");
|
|
917
|
+
var import_opticore_translator5 = require("opticore-translator");
|
|
918
|
+
var OpenSSLErrors = class {
|
|
919
|
+
logger = new import_opticore_logger4.LoggerCore();
|
|
920
|
+
stackTrace;
|
|
921
|
+
localLanguage;
|
|
922
|
+
constructor(defaultLocalLang) {
|
|
923
|
+
this.localLanguage = defaultLocalLang;
|
|
924
|
+
}
|
|
925
|
+
errOsSLEvpUnsupported(error) {
|
|
926
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
927
|
+
this.logger.error(
|
|
928
|
+
import_opticore_translator5.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
929
|
+
"ERR_OSSL_EVP_UNSUPPORTED",
|
|
930
|
+
this.stackTrace.name,
|
|
931
|
+
this.stackTrace.stack,
|
|
932
|
+
import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
errOsSLBadDecrypt(error) {
|
|
936
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
937
|
+
this.logger.error(
|
|
938
|
+
import_opticore_translator5.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
939
|
+
"ERR_OSSL_BAD_DECRYPT",
|
|
940
|
+
this.stackTrace.name,
|
|
941
|
+
this.stackTrace.stack,
|
|
942
|
+
import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
errOsSLWrongFinalBlockLength(error) {
|
|
946
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
947
|
+
this.logger.error(
|
|
948
|
+
import_opticore_translator5.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
949
|
+
"ERR_OSSL_WRONG_FINAL_BLOCK_LENGTH",
|
|
950
|
+
this.stackTrace.name,
|
|
951
|
+
this.stackTrace.stack,
|
|
952
|
+
import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
traceError(props, name, status7) {
|
|
956
|
+
return new StackTraceError(props, name, status7, true);
|
|
983
957
|
}
|
|
984
958
|
};
|
|
985
959
|
|
|
986
|
-
// src/core/errors/
|
|
987
|
-
var
|
|
988
|
-
var
|
|
989
|
-
|
|
990
|
-
|
|
960
|
+
// src/core/errors/internal/internalErrors.ts
|
|
961
|
+
var import_opticore_logger5 = require("opticore-logger");
|
|
962
|
+
var import_opticore_http_response5 = require("opticore-http-response");
|
|
963
|
+
var import_opticore_translator6 = require("opticore-translator");
|
|
964
|
+
var InternalErrors = class {
|
|
965
|
+
logger = new import_opticore_logger5.LoggerCore();
|
|
966
|
+
stackTrace;
|
|
967
|
+
localLanguage;
|
|
968
|
+
constructor(defaultLocalLang) {
|
|
969
|
+
this.localLanguage = defaultLocalLang;
|
|
970
|
+
}
|
|
971
|
+
errInvalidArgType(error) {
|
|
972
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
973
|
+
this.logger.error(
|
|
974
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
975
|
+
"ERR_INVALID_ARG_TYPE",
|
|
976
|
+
this.stackTrace.name,
|
|
977
|
+
this.stackTrace.stack,
|
|
978
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
errInvalidCallback(error) {
|
|
982
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
983
|
+
this.logger.error(
|
|
984
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
985
|
+
"ERR_INVALID_CALLBACK",
|
|
986
|
+
this.stackTrace.name,
|
|
987
|
+
this.stackTrace.stack,
|
|
988
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
989
|
+
);
|
|
990
|
+
}
|
|
991
|
+
errHttpHeadersSent(error) {
|
|
992
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
993
|
+
this.logger.error(
|
|
994
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
995
|
+
"ERR_HTTP_HEADERS_SENT",
|
|
996
|
+
this.stackTrace.name,
|
|
997
|
+
this.stackTrace.stack,
|
|
998
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
errStreamDestroyed(error) {
|
|
1002
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1003
|
+
this.logger.error(
|
|
1004
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1005
|
+
"ERR_STREAM_DESTROYED",
|
|
1006
|
+
this.stackTrace.name,
|
|
1007
|
+
this.stackTrace.stack,
|
|
1008
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1009
|
+
);
|
|
1010
|
+
}
|
|
1011
|
+
errTlsCertAltNameInvalid(error) {
|
|
1012
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1013
|
+
this.logger.error(
|
|
1014
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1015
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
1016
|
+
this.stackTrace.name,
|
|
1017
|
+
this.stackTrace.stack,
|
|
1018
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1021
|
+
errUnsupportedEsmUrlScheme(error) {
|
|
1022
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1023
|
+
this.logger.error(
|
|
1024
|
+
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1025
|
+
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
1026
|
+
this.stackTrace.name,
|
|
1027
|
+
this.stackTrace.stack,
|
|
1028
|
+
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
traceError(props, name, status7) {
|
|
1032
|
+
return new StackTraceError(props, name, status7, true);
|
|
991
1033
|
}
|
|
992
1034
|
};
|
|
993
1035
|
|
|
994
|
-
// src/core/errors/
|
|
995
|
-
var
|
|
996
|
-
var
|
|
997
|
-
|
|
998
|
-
|
|
1036
|
+
// src/core/errors/assertion/assertionErrors.ts
|
|
1037
|
+
var import_opticore_logger6 = require("opticore-logger");
|
|
1038
|
+
var import_opticore_http_response6 = require("opticore-http-response");
|
|
1039
|
+
var import_opticore_translator7 = require("opticore-translator");
|
|
1040
|
+
var AssertionErrors = class {
|
|
1041
|
+
logger = new import_opticore_logger6.LoggerCore();
|
|
1042
|
+
stackTrace;
|
|
1043
|
+
localLanguage;
|
|
1044
|
+
constructor(defaultLocalLang) {
|
|
1045
|
+
this.localLanguage = defaultLocalLang;
|
|
1046
|
+
}
|
|
1047
|
+
allError(error) {
|
|
1048
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1049
|
+
this.logger.error(
|
|
1050
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1051
|
+
"Error",
|
|
1052
|
+
this.stackTrace.name,
|
|
1053
|
+
this.stackTrace.stack,
|
|
1054
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
evalError(error) {
|
|
1058
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1059
|
+
this.logger.error(
|
|
1060
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1061
|
+
"EvalError",
|
|
1062
|
+
this.stackTrace.name,
|
|
1063
|
+
this.stackTrace.stack,
|
|
1064
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
rangeError(error) {
|
|
1068
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1069
|
+
this.logger.error(
|
|
1070
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1071
|
+
"RangeError",
|
|
1072
|
+
this.stackTrace.name,
|
|
1073
|
+
this.stackTrace.stack,
|
|
1074
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
1077
|
+
referenceError(error) {
|
|
1078
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1079
|
+
this.logger.error(
|
|
1080
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1081
|
+
"ReferenceError",
|
|
1082
|
+
this.stackTrace.name,
|
|
1083
|
+
this.stackTrace.stack,
|
|
1084
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
syntaxError(error) {
|
|
1088
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1089
|
+
this.logger.error(
|
|
1090
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1091
|
+
"SyntaxError",
|
|
1092
|
+
this.stackTrace.name,
|
|
1093
|
+
this.stackTrace.stack,
|
|
1094
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
typeError(error) {
|
|
1098
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1099
|
+
this.logger.error(
|
|
1100
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1101
|
+
"TypeError",
|
|
1102
|
+
this.stackTrace.name,
|
|
1103
|
+
this.stackTrace.stack,
|
|
1104
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
uRIError(error) {
|
|
1108
|
+
this.stackTrace = this.traceError(error.message, error.name, import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR);
|
|
1109
|
+
this.logger.error(
|
|
1110
|
+
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1111
|
+
"URIError",
|
|
1112
|
+
this.stackTrace.name,
|
|
1113
|
+
this.stackTrace.stack,
|
|
1114
|
+
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
traceError(props, name, status7) {
|
|
1118
|
+
return new StackTraceError(props, name, status7, true);
|
|
999
1119
|
}
|
|
1000
1120
|
};
|
|
1001
1121
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1002
1122
|
0 && (module.exports = {
|
|
1123
|
+
AssertionErrors,
|
|
1003
1124
|
CErrorName,
|
|
1004
1125
|
CEvent,
|
|
1005
1126
|
CEventNameError,
|
|
1127
|
+
InternalErrors,
|
|
1128
|
+
JavaScriptErrors,
|
|
1129
|
+
OpenSSLErrors,
|
|
1006
1130
|
ServerListenEventError,
|
|
1007
|
-
StackTraceAssertionError,
|
|
1008
|
-
StackTraceBeforeExit,
|
|
1009
|
-
StackTraceEACCES,
|
|
1010
|
-
StackTraceEADDRINUSE,
|
|
1011
|
-
StackTraceECONNREFUSED,
|
|
1012
|
-
StackTraceECONNRESET,
|
|
1013
|
-
StackTraceEEXIST,
|
|
1014
|
-
StackTraceEISDIR,
|
|
1015
|
-
StackTraceEMFILE,
|
|
1016
|
-
StackTraceENOENT,
|
|
1017
|
-
StackTraceENOTDIR,
|
|
1018
|
-
StackTraceENOTEMPTY,
|
|
1019
|
-
StackTraceEPERM,
|
|
1020
|
-
StackTraceEPIPE,
|
|
1021
|
-
StackTraceERR_HTTP_HEADERS_SENT,
|
|
1022
|
-
StackTraceERR_INVALID_ARG_TYPE,
|
|
1023
|
-
StackTraceERR_INVALID_CALLBACK,
|
|
1024
|
-
StackTraceERR_OSSL_BAD_DECRYPT,
|
|
1025
|
-
StackTraceERR_OSSL_EVP_UNSUPPORTED,
|
|
1026
|
-
StackTraceERR_OSSL_WRONG_FINAL_BLOCK_LENGTH,
|
|
1027
|
-
StackTraceERR_STREAM_DESTROYED,
|
|
1028
|
-
StackTraceERR_TLS_CERT_ALTNAME_INVALID,
|
|
1029
|
-
StackTraceERR_UNSUPPORTED_ESM_URL_SCHEME,
|
|
1030
|
-
StackTraceETIMEDOUT,
|
|
1031
1131
|
StackTraceError,
|
|
1032
|
-
|
|
1033
|
-
StackTraceExit,
|
|
1034
|
-
StackTraceGeneralError,
|
|
1035
|
-
StackTraceOpenSSLError,
|
|
1036
|
-
StackTraceRangeError,
|
|
1037
|
-
StackTraceReferenceError,
|
|
1038
|
-
StackTraceSyntaxError,
|
|
1039
|
-
StackTraceSystemError,
|
|
1040
|
-
StackTraceTypeError,
|
|
1041
|
-
StackTraceURIError,
|
|
1042
|
-
StackTraceUncaughtException,
|
|
1043
|
-
StackTraceUnhandledRejection
|
|
1132
|
+
SystemErrors
|
|
1044
1133
|
});
|