opticore-catch-exception-error 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/example/index.ts +5 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -560,7 +560,7 @@ var ServerListenEventError = class {
|
|
|
560
560
|
static unhandledRejection(reason, promise) {
|
|
561
561
|
this.stackTrace = this.traceError(
|
|
562
562
|
import_opticore_translator.TranslationLoader.t("unhandledRejectionAtPromise", import_opticore_translator.CLocal, { promise, reason }),
|
|
563
|
-
import_opticore_translator.TranslationLoader.t("unhandledRejection", import_opticore_translator.CLocal),
|
|
563
|
+
import_opticore_translator.TranslationLoader.t("unhandledRejection", import_opticore_translator.CLocal, { promise, reason }),
|
|
564
564
|
import_opticore_http_response11.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
565
565
|
);
|
|
566
566
|
this.logger.error(
|
package/dist/index.js
CHANGED
|
@@ -509,7 +509,7 @@ var ServerListenEventError = class {
|
|
|
509
509
|
static unhandledRejection(reason, promise) {
|
|
510
510
|
this.stackTrace = this.traceError(
|
|
511
511
|
TranslationLoader.t("unhandledRejectionAtPromise", CLocal, { promise, reason }),
|
|
512
|
-
TranslationLoader.t("unhandledRejection", CLocal),
|
|
512
|
+
TranslationLoader.t("unhandledRejection", CLocal, { promise, reason }),
|
|
513
513
|
status11.SERVICE_UNAVAILABLE
|
|
514
514
|
);
|
|
515
515
|
this.logger.error(
|
package/example/index.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {CLocal, TranslationLoader} from "opticore-translator";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
TranslationLoader.loadTranslations(path.join(process.cwd(), 'src','utils', 'translations'));
|
|
5
|
+
console.log(TranslationLoader.t("rejectionPromise", 'en', { promise: "wd digital" }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-catch-exception-error",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "opticore catch exception error",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"chalk": "^5.4.1",
|
|
29
29
|
"opticore-express": "^1.0.3",
|
|
30
30
|
"opticore-http-response": "^1.0.3",
|
|
31
|
-
"opticore-translator": "^1.0.
|
|
31
|
+
"opticore-translator": "^1.0.3",
|
|
32
32
|
"tsx": "^4.19.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|