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