opticore-catch-exception-error 1.0.18 → 1.0.19
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 +48 -51
- package/dist/index.js +48 -51
- package/package.json +1 -1
- package/example/index.ts +0 -20
package/dist/index.cjs
CHANGED
|
@@ -471,21 +471,18 @@ var ServerListenEventError = class {
|
|
|
471
471
|
* @param promise
|
|
472
472
|
*/
|
|
473
473
|
promiseRejectionHandled(promise) {
|
|
474
|
-
|
|
475
|
-
this.
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
this.
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
);
|
|
487
|
-
} catch (err) {
|
|
488
|
-
}
|
|
474
|
+
this.stackTrace = this.traceError(
|
|
475
|
+
import_opticore_translator2.TranslationLoader.t("promise", this.localeLanguage, { promise }),
|
|
476
|
+
import_opticore_translator2.TranslationLoader.t("rejectionPromise", this.localeLanguage, { promise }),
|
|
477
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
478
|
+
);
|
|
479
|
+
this.logger.error(
|
|
480
|
+
this.stackTrace.message,
|
|
481
|
+
"PromiseRejectionHandled",
|
|
482
|
+
this.stackTrace.name,
|
|
483
|
+
promise,
|
|
484
|
+
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
485
|
+
);
|
|
489
486
|
}
|
|
490
487
|
/**
|
|
491
488
|
*
|
|
@@ -533,7 +530,7 @@ var ServerListenEventError = class {
|
|
|
533
530
|
this.stackTrace.message,
|
|
534
531
|
"UnhandledRejection",
|
|
535
532
|
this.stackTrace.name,
|
|
536
|
-
|
|
533
|
+
`reason: ${reason} - promise: ${promise}`,
|
|
537
534
|
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
538
535
|
);
|
|
539
536
|
}
|
|
@@ -551,7 +548,7 @@ var ServerListenEventError = class {
|
|
|
551
548
|
this.stackTrace.message,
|
|
552
549
|
import_opticore_translator2.TranslationLoader.t("warning", this.localeLanguage, { warning }),
|
|
553
550
|
this.stackTrace.name,
|
|
554
|
-
|
|
551
|
+
`warning: ${warning}`,
|
|
555
552
|
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
556
553
|
);
|
|
557
554
|
}
|
|
@@ -569,7 +566,7 @@ var ServerListenEventError = class {
|
|
|
569
566
|
this.stackTrace.message,
|
|
570
567
|
"Message",
|
|
571
568
|
this.stackTrace.name,
|
|
572
|
-
|
|
569
|
+
`message: ${message}`,
|
|
573
570
|
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
574
571
|
);
|
|
575
572
|
}
|
|
@@ -589,7 +586,7 @@ var ServerListenEventError = class {
|
|
|
589
586
|
this.stackTrace.message,
|
|
590
587
|
"multipleResolves",
|
|
591
588
|
this.stackTrace.name,
|
|
592
|
-
|
|
589
|
+
`type: ${type}, promise: ${promise}, reason: ${reason}`,
|
|
593
590
|
import_opticore_http_response.HttpStatusCode.SERVICE_UNAVAILABLE
|
|
594
591
|
);
|
|
595
592
|
}
|
|
@@ -617,7 +614,7 @@ var ServerListenEventError = class {
|
|
|
617
614
|
this.stackTrace.message,
|
|
618
615
|
"SIGTERM",
|
|
619
616
|
this.stackTrace.name,
|
|
620
|
-
|
|
617
|
+
signal.toString(),
|
|
621
618
|
import_opticore_http_response.HttpStatusCode.NOT_ACCEPTABLE
|
|
622
619
|
);
|
|
623
620
|
import_process.default.exit(0);
|
|
@@ -706,7 +703,7 @@ var JavaScriptErrors = class {
|
|
|
706
703
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
707
704
|
"EvalError",
|
|
708
705
|
this.stackTrace.name,
|
|
709
|
-
|
|
706
|
+
error.stack,
|
|
710
707
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
711
708
|
);
|
|
712
709
|
}
|
|
@@ -716,7 +713,7 @@ var JavaScriptErrors = class {
|
|
|
716
713
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
717
714
|
"RangeError",
|
|
718
715
|
this.stackTrace.name,
|
|
719
|
-
|
|
716
|
+
error.stack,
|
|
720
717
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
721
718
|
);
|
|
722
719
|
}
|
|
@@ -726,7 +723,7 @@ var JavaScriptErrors = class {
|
|
|
726
723
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
727
724
|
"ReferenceError",
|
|
728
725
|
this.stackTrace.name,
|
|
729
|
-
|
|
726
|
+
error.stack,
|
|
730
727
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
731
728
|
);
|
|
732
729
|
}
|
|
@@ -736,7 +733,7 @@ var JavaScriptErrors = class {
|
|
|
736
733
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
737
734
|
"SyntaxError",
|
|
738
735
|
this.stackTrace.name,
|
|
739
|
-
|
|
736
|
+
error.stack,
|
|
740
737
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
741
738
|
);
|
|
742
739
|
}
|
|
@@ -746,7 +743,7 @@ var JavaScriptErrors = class {
|
|
|
746
743
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
747
744
|
"TypeError",
|
|
748
745
|
this.stackTrace.name,
|
|
749
|
-
|
|
746
|
+
error.stack,
|
|
750
747
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
751
748
|
);
|
|
752
749
|
}
|
|
@@ -756,7 +753,7 @@ var JavaScriptErrors = class {
|
|
|
756
753
|
import_opticore_translator3.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
757
754
|
"URIError",
|
|
758
755
|
this.stackTrace.name,
|
|
759
|
-
|
|
756
|
+
error.stack,
|
|
760
757
|
import_opticore_http_response2.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
761
758
|
);
|
|
762
759
|
}
|
|
@@ -792,7 +789,7 @@ var SystemErrors = class {
|
|
|
792
789
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
793
790
|
"EADDRINUSE",
|
|
794
791
|
this.stackTrace.name,
|
|
795
|
-
|
|
792
|
+
error.stack,
|
|
796
793
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
797
794
|
);
|
|
798
795
|
}
|
|
@@ -802,7 +799,7 @@ var SystemErrors = class {
|
|
|
802
799
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
803
800
|
"ECONNREFUSED",
|
|
804
801
|
this.stackTrace.name,
|
|
805
|
-
|
|
802
|
+
error.stack,
|
|
806
803
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
807
804
|
);
|
|
808
805
|
}
|
|
@@ -812,7 +809,7 @@ var SystemErrors = class {
|
|
|
812
809
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
813
810
|
"ECONNRESET",
|
|
814
811
|
this.stackTrace.name,
|
|
815
|
-
|
|
812
|
+
error.stack,
|
|
816
813
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
817
814
|
);
|
|
818
815
|
}
|
|
@@ -822,7 +819,7 @@ var SystemErrors = class {
|
|
|
822
819
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
823
820
|
"EEXIST",
|
|
824
821
|
this.stackTrace.name,
|
|
825
|
-
|
|
822
|
+
error.stack,
|
|
826
823
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
827
824
|
);
|
|
828
825
|
}
|
|
@@ -832,7 +829,7 @@ var SystemErrors = class {
|
|
|
832
829
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
833
830
|
"EISDIR",
|
|
834
831
|
this.stackTrace.name,
|
|
835
|
-
|
|
832
|
+
error.stack,
|
|
836
833
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
837
834
|
);
|
|
838
835
|
}
|
|
@@ -842,7 +839,7 @@ var SystemErrors = class {
|
|
|
842
839
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
843
840
|
"EMFILE",
|
|
844
841
|
this.stackTrace.name,
|
|
845
|
-
|
|
842
|
+
error.stack,
|
|
846
843
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
847
844
|
);
|
|
848
845
|
}
|
|
@@ -852,7 +849,7 @@ var SystemErrors = class {
|
|
|
852
849
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
853
850
|
"ENOENT",
|
|
854
851
|
this.stackTrace.name,
|
|
855
|
-
|
|
852
|
+
error.stack,
|
|
856
853
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
857
854
|
);
|
|
858
855
|
}
|
|
@@ -862,7 +859,7 @@ var SystemErrors = class {
|
|
|
862
859
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
863
860
|
"ENOTDIR",
|
|
864
861
|
this.stackTrace.name,
|
|
865
|
-
|
|
862
|
+
error.stack,
|
|
866
863
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
867
864
|
);
|
|
868
865
|
}
|
|
@@ -872,7 +869,7 @@ var SystemErrors = class {
|
|
|
872
869
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
873
870
|
"ENOTEMPTY",
|
|
874
871
|
this.stackTrace.name,
|
|
875
|
-
|
|
872
|
+
error.stack,
|
|
876
873
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
877
874
|
);
|
|
878
875
|
}
|
|
@@ -882,7 +879,7 @@ var SystemErrors = class {
|
|
|
882
879
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
883
880
|
"EPERM",
|
|
884
881
|
this.stackTrace.name,
|
|
885
|
-
|
|
882
|
+
error.stack,
|
|
886
883
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
887
884
|
);
|
|
888
885
|
}
|
|
@@ -892,7 +889,7 @@ var SystemErrors = class {
|
|
|
892
889
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
893
890
|
"EPIPE",
|
|
894
891
|
this.stackTrace.name,
|
|
895
|
-
|
|
892
|
+
error.stack,
|
|
896
893
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
897
894
|
);
|
|
898
895
|
}
|
|
@@ -902,7 +899,7 @@ var SystemErrors = class {
|
|
|
902
899
|
import_opticore_translator4.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
903
900
|
"ETIMEDOUT",
|
|
904
901
|
this.stackTrace.name,
|
|
905
|
-
|
|
902
|
+
error.stack,
|
|
906
903
|
import_opticore_http_response3.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
907
904
|
);
|
|
908
905
|
}
|
|
@@ -938,7 +935,7 @@ var OpenSSLErrors = class {
|
|
|
938
935
|
import_opticore_translator5.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
939
936
|
"ERR_OSSL_BAD_DECRYPT",
|
|
940
937
|
this.stackTrace.name,
|
|
941
|
-
|
|
938
|
+
error.stack,
|
|
942
939
|
import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
943
940
|
);
|
|
944
941
|
}
|
|
@@ -948,7 +945,7 @@ var OpenSSLErrors = class {
|
|
|
948
945
|
import_opticore_translator5.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
949
946
|
"ERR_OSSL_WRONG_FINAL_BLOCK_LENGTH",
|
|
950
947
|
this.stackTrace.name,
|
|
951
|
-
|
|
948
|
+
error.stack,
|
|
952
949
|
import_opticore_http_response4.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
953
950
|
);
|
|
954
951
|
}
|
|
@@ -984,7 +981,7 @@ var InternalErrors = class {
|
|
|
984
981
|
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
985
982
|
"ERR_INVALID_CALLBACK",
|
|
986
983
|
this.stackTrace.name,
|
|
987
|
-
|
|
984
|
+
error.stack,
|
|
988
985
|
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
989
986
|
);
|
|
990
987
|
}
|
|
@@ -994,7 +991,7 @@ var InternalErrors = class {
|
|
|
994
991
|
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
995
992
|
"ERR_HTTP_HEADERS_SENT",
|
|
996
993
|
this.stackTrace.name,
|
|
997
|
-
|
|
994
|
+
error.stack,
|
|
998
995
|
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
999
996
|
);
|
|
1000
997
|
}
|
|
@@ -1004,7 +1001,7 @@ var InternalErrors = class {
|
|
|
1004
1001
|
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1005
1002
|
"ERR_STREAM_DESTROYED",
|
|
1006
1003
|
this.stackTrace.name,
|
|
1007
|
-
|
|
1004
|
+
error.stack,
|
|
1008
1005
|
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1009
1006
|
);
|
|
1010
1007
|
}
|
|
@@ -1014,7 +1011,7 @@ var InternalErrors = class {
|
|
|
1014
1011
|
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1015
1012
|
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
1016
1013
|
this.stackTrace.name,
|
|
1017
|
-
|
|
1014
|
+
error.stack,
|
|
1018
1015
|
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1019
1016
|
);
|
|
1020
1017
|
}
|
|
@@ -1024,7 +1021,7 @@ var InternalErrors = class {
|
|
|
1024
1021
|
import_opticore_translator6.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1025
1022
|
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
1026
1023
|
this.stackTrace.name,
|
|
1027
|
-
|
|
1024
|
+
error.stack,
|
|
1028
1025
|
import_opticore_http_response5.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1029
1026
|
);
|
|
1030
1027
|
}
|
|
@@ -1060,7 +1057,7 @@ var AssertionErrors = class {
|
|
|
1060
1057
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1061
1058
|
"EvalError",
|
|
1062
1059
|
this.stackTrace.name,
|
|
1063
|
-
|
|
1060
|
+
error.stack,
|
|
1064
1061
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1065
1062
|
);
|
|
1066
1063
|
}
|
|
@@ -1070,7 +1067,7 @@ var AssertionErrors = class {
|
|
|
1070
1067
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1071
1068
|
"RangeError",
|
|
1072
1069
|
this.stackTrace.name,
|
|
1073
|
-
|
|
1070
|
+
error.stack,
|
|
1074
1071
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1075
1072
|
);
|
|
1076
1073
|
}
|
|
@@ -1080,7 +1077,7 @@ var AssertionErrors = class {
|
|
|
1080
1077
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1081
1078
|
"ReferenceError",
|
|
1082
1079
|
this.stackTrace.name,
|
|
1083
|
-
|
|
1080
|
+
error.stack,
|
|
1084
1081
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1085
1082
|
);
|
|
1086
1083
|
}
|
|
@@ -1090,7 +1087,7 @@ var AssertionErrors = class {
|
|
|
1090
1087
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1091
1088
|
"SyntaxError",
|
|
1092
1089
|
this.stackTrace.name,
|
|
1093
|
-
|
|
1090
|
+
error.stack,
|
|
1094
1091
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1095
1092
|
);
|
|
1096
1093
|
}
|
|
@@ -1100,7 +1097,7 @@ var AssertionErrors = class {
|
|
|
1100
1097
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1101
1098
|
"TypeError",
|
|
1102
1099
|
this.stackTrace.name,
|
|
1103
|
-
|
|
1100
|
+
error.stack,
|
|
1104
1101
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1105
1102
|
);
|
|
1106
1103
|
}
|
|
@@ -1110,7 +1107,7 @@ var AssertionErrors = class {
|
|
|
1110
1107
|
import_opticore_translator7.TranslationLoader.t(this.stackTrace.message, this.localLanguage),
|
|
1111
1108
|
"URIError",
|
|
1112
1109
|
this.stackTrace.name,
|
|
1113
|
-
|
|
1110
|
+
error.stack,
|
|
1114
1111
|
import_opticore_http_response6.HttpStatusCode.INTERNAL_SERVER_ERROR
|
|
1115
1112
|
);
|
|
1116
1113
|
}
|
package/dist/index.js
CHANGED
|
@@ -422,21 +422,18 @@ var ServerListenEventError = class {
|
|
|
422
422
|
* @param promise
|
|
423
423
|
*/
|
|
424
424
|
promiseRejectionHandled(promise) {
|
|
425
|
-
|
|
426
|
-
this.
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
this.
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
);
|
|
438
|
-
} catch (err) {
|
|
439
|
-
}
|
|
425
|
+
this.stackTrace = this.traceError(
|
|
426
|
+
TranslationLoader2.t("promise", this.localeLanguage, { promise }),
|
|
427
|
+
TranslationLoader2.t("rejectionPromise", this.localeLanguage, { promise }),
|
|
428
|
+
status.SERVICE_UNAVAILABLE
|
|
429
|
+
);
|
|
430
|
+
this.logger.error(
|
|
431
|
+
this.stackTrace.message,
|
|
432
|
+
"PromiseRejectionHandled",
|
|
433
|
+
this.stackTrace.name,
|
|
434
|
+
promise,
|
|
435
|
+
status.SERVICE_UNAVAILABLE
|
|
436
|
+
);
|
|
440
437
|
}
|
|
441
438
|
/**
|
|
442
439
|
*
|
|
@@ -484,7 +481,7 @@ var ServerListenEventError = class {
|
|
|
484
481
|
this.stackTrace.message,
|
|
485
482
|
"UnhandledRejection",
|
|
486
483
|
this.stackTrace.name,
|
|
487
|
-
|
|
484
|
+
`reason: ${reason} - promise: ${promise}`,
|
|
488
485
|
status.SERVICE_UNAVAILABLE
|
|
489
486
|
);
|
|
490
487
|
}
|
|
@@ -502,7 +499,7 @@ var ServerListenEventError = class {
|
|
|
502
499
|
this.stackTrace.message,
|
|
503
500
|
TranslationLoader2.t("warning", this.localeLanguage, { warning }),
|
|
504
501
|
this.stackTrace.name,
|
|
505
|
-
|
|
502
|
+
`warning: ${warning}`,
|
|
506
503
|
status.SERVICE_UNAVAILABLE
|
|
507
504
|
);
|
|
508
505
|
}
|
|
@@ -520,7 +517,7 @@ var ServerListenEventError = class {
|
|
|
520
517
|
this.stackTrace.message,
|
|
521
518
|
"Message",
|
|
522
519
|
this.stackTrace.name,
|
|
523
|
-
|
|
520
|
+
`message: ${message}`,
|
|
524
521
|
status.SERVICE_UNAVAILABLE
|
|
525
522
|
);
|
|
526
523
|
}
|
|
@@ -540,7 +537,7 @@ var ServerListenEventError = class {
|
|
|
540
537
|
this.stackTrace.message,
|
|
541
538
|
"multipleResolves",
|
|
542
539
|
this.stackTrace.name,
|
|
543
|
-
|
|
540
|
+
`type: ${type}, promise: ${promise}, reason: ${reason}`,
|
|
544
541
|
status.SERVICE_UNAVAILABLE
|
|
545
542
|
);
|
|
546
543
|
}
|
|
@@ -568,7 +565,7 @@ var ServerListenEventError = class {
|
|
|
568
565
|
this.stackTrace.message,
|
|
569
566
|
"SIGTERM",
|
|
570
567
|
this.stackTrace.name,
|
|
571
|
-
|
|
568
|
+
signal.toString(),
|
|
572
569
|
status.NOT_ACCEPTABLE
|
|
573
570
|
);
|
|
574
571
|
process.exit(0);
|
|
@@ -657,7 +654,7 @@ var JavaScriptErrors = class {
|
|
|
657
654
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
658
655
|
"EvalError",
|
|
659
656
|
this.stackTrace.name,
|
|
660
|
-
|
|
657
|
+
error.stack,
|
|
661
658
|
status2.INTERNAL_SERVER_ERROR
|
|
662
659
|
);
|
|
663
660
|
}
|
|
@@ -667,7 +664,7 @@ var JavaScriptErrors = class {
|
|
|
667
664
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
668
665
|
"RangeError",
|
|
669
666
|
this.stackTrace.name,
|
|
670
|
-
|
|
667
|
+
error.stack,
|
|
671
668
|
status2.INTERNAL_SERVER_ERROR
|
|
672
669
|
);
|
|
673
670
|
}
|
|
@@ -677,7 +674,7 @@ var JavaScriptErrors = class {
|
|
|
677
674
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
678
675
|
"ReferenceError",
|
|
679
676
|
this.stackTrace.name,
|
|
680
|
-
|
|
677
|
+
error.stack,
|
|
681
678
|
status2.INTERNAL_SERVER_ERROR
|
|
682
679
|
);
|
|
683
680
|
}
|
|
@@ -687,7 +684,7 @@ var JavaScriptErrors = class {
|
|
|
687
684
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
688
685
|
"SyntaxError",
|
|
689
686
|
this.stackTrace.name,
|
|
690
|
-
|
|
687
|
+
error.stack,
|
|
691
688
|
status2.INTERNAL_SERVER_ERROR
|
|
692
689
|
);
|
|
693
690
|
}
|
|
@@ -697,7 +694,7 @@ var JavaScriptErrors = class {
|
|
|
697
694
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
698
695
|
"TypeError",
|
|
699
696
|
this.stackTrace.name,
|
|
700
|
-
|
|
697
|
+
error.stack,
|
|
701
698
|
status2.INTERNAL_SERVER_ERROR
|
|
702
699
|
);
|
|
703
700
|
}
|
|
@@ -707,7 +704,7 @@ var JavaScriptErrors = class {
|
|
|
707
704
|
TranslationLoader3.t(this.stackTrace.message, this.localLanguage),
|
|
708
705
|
"URIError",
|
|
709
706
|
this.stackTrace.name,
|
|
710
|
-
|
|
707
|
+
error.stack,
|
|
711
708
|
status2.INTERNAL_SERVER_ERROR
|
|
712
709
|
);
|
|
713
710
|
}
|
|
@@ -743,7 +740,7 @@ var SystemErrors = class {
|
|
|
743
740
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
744
741
|
"EADDRINUSE",
|
|
745
742
|
this.stackTrace.name,
|
|
746
|
-
|
|
743
|
+
error.stack,
|
|
747
744
|
status3.INTERNAL_SERVER_ERROR
|
|
748
745
|
);
|
|
749
746
|
}
|
|
@@ -753,7 +750,7 @@ var SystemErrors = class {
|
|
|
753
750
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
754
751
|
"ECONNREFUSED",
|
|
755
752
|
this.stackTrace.name,
|
|
756
|
-
|
|
753
|
+
error.stack,
|
|
757
754
|
status3.INTERNAL_SERVER_ERROR
|
|
758
755
|
);
|
|
759
756
|
}
|
|
@@ -763,7 +760,7 @@ var SystemErrors = class {
|
|
|
763
760
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
764
761
|
"ECONNRESET",
|
|
765
762
|
this.stackTrace.name,
|
|
766
|
-
|
|
763
|
+
error.stack,
|
|
767
764
|
status3.INTERNAL_SERVER_ERROR
|
|
768
765
|
);
|
|
769
766
|
}
|
|
@@ -773,7 +770,7 @@ var SystemErrors = class {
|
|
|
773
770
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
774
771
|
"EEXIST",
|
|
775
772
|
this.stackTrace.name,
|
|
776
|
-
|
|
773
|
+
error.stack,
|
|
777
774
|
status3.INTERNAL_SERVER_ERROR
|
|
778
775
|
);
|
|
779
776
|
}
|
|
@@ -783,7 +780,7 @@ var SystemErrors = class {
|
|
|
783
780
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
784
781
|
"EISDIR",
|
|
785
782
|
this.stackTrace.name,
|
|
786
|
-
|
|
783
|
+
error.stack,
|
|
787
784
|
status3.INTERNAL_SERVER_ERROR
|
|
788
785
|
);
|
|
789
786
|
}
|
|
@@ -793,7 +790,7 @@ var SystemErrors = class {
|
|
|
793
790
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
794
791
|
"EMFILE",
|
|
795
792
|
this.stackTrace.name,
|
|
796
|
-
|
|
793
|
+
error.stack,
|
|
797
794
|
status3.INTERNAL_SERVER_ERROR
|
|
798
795
|
);
|
|
799
796
|
}
|
|
@@ -803,7 +800,7 @@ var SystemErrors = class {
|
|
|
803
800
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
804
801
|
"ENOENT",
|
|
805
802
|
this.stackTrace.name,
|
|
806
|
-
|
|
803
|
+
error.stack,
|
|
807
804
|
status3.INTERNAL_SERVER_ERROR
|
|
808
805
|
);
|
|
809
806
|
}
|
|
@@ -813,7 +810,7 @@ var SystemErrors = class {
|
|
|
813
810
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
814
811
|
"ENOTDIR",
|
|
815
812
|
this.stackTrace.name,
|
|
816
|
-
|
|
813
|
+
error.stack,
|
|
817
814
|
status3.INTERNAL_SERVER_ERROR
|
|
818
815
|
);
|
|
819
816
|
}
|
|
@@ -823,7 +820,7 @@ var SystemErrors = class {
|
|
|
823
820
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
824
821
|
"ENOTEMPTY",
|
|
825
822
|
this.stackTrace.name,
|
|
826
|
-
|
|
823
|
+
error.stack,
|
|
827
824
|
status3.INTERNAL_SERVER_ERROR
|
|
828
825
|
);
|
|
829
826
|
}
|
|
@@ -833,7 +830,7 @@ var SystemErrors = class {
|
|
|
833
830
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
834
831
|
"EPERM",
|
|
835
832
|
this.stackTrace.name,
|
|
836
|
-
|
|
833
|
+
error.stack,
|
|
837
834
|
status3.INTERNAL_SERVER_ERROR
|
|
838
835
|
);
|
|
839
836
|
}
|
|
@@ -843,7 +840,7 @@ var SystemErrors = class {
|
|
|
843
840
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
844
841
|
"EPIPE",
|
|
845
842
|
this.stackTrace.name,
|
|
846
|
-
|
|
843
|
+
error.stack,
|
|
847
844
|
status3.INTERNAL_SERVER_ERROR
|
|
848
845
|
);
|
|
849
846
|
}
|
|
@@ -853,7 +850,7 @@ var SystemErrors = class {
|
|
|
853
850
|
TranslationLoader4.t(this.stackTrace.message, this.localLanguage),
|
|
854
851
|
"ETIMEDOUT",
|
|
855
852
|
this.stackTrace.name,
|
|
856
|
-
|
|
853
|
+
error.stack,
|
|
857
854
|
status3.INTERNAL_SERVER_ERROR
|
|
858
855
|
);
|
|
859
856
|
}
|
|
@@ -889,7 +886,7 @@ var OpenSSLErrors = class {
|
|
|
889
886
|
TranslationLoader5.t(this.stackTrace.message, this.localLanguage),
|
|
890
887
|
"ERR_OSSL_BAD_DECRYPT",
|
|
891
888
|
this.stackTrace.name,
|
|
892
|
-
|
|
889
|
+
error.stack,
|
|
893
890
|
status4.INTERNAL_SERVER_ERROR
|
|
894
891
|
);
|
|
895
892
|
}
|
|
@@ -899,7 +896,7 @@ var OpenSSLErrors = class {
|
|
|
899
896
|
TranslationLoader5.t(this.stackTrace.message, this.localLanguage),
|
|
900
897
|
"ERR_OSSL_WRONG_FINAL_BLOCK_LENGTH",
|
|
901
898
|
this.stackTrace.name,
|
|
902
|
-
|
|
899
|
+
error.stack,
|
|
903
900
|
status4.INTERNAL_SERVER_ERROR
|
|
904
901
|
);
|
|
905
902
|
}
|
|
@@ -935,7 +932,7 @@ var InternalErrors = class {
|
|
|
935
932
|
TranslationLoader6.t(this.stackTrace.message, this.localLanguage),
|
|
936
933
|
"ERR_INVALID_CALLBACK",
|
|
937
934
|
this.stackTrace.name,
|
|
938
|
-
|
|
935
|
+
error.stack,
|
|
939
936
|
status5.INTERNAL_SERVER_ERROR
|
|
940
937
|
);
|
|
941
938
|
}
|
|
@@ -945,7 +942,7 @@ var InternalErrors = class {
|
|
|
945
942
|
TranslationLoader6.t(this.stackTrace.message, this.localLanguage),
|
|
946
943
|
"ERR_HTTP_HEADERS_SENT",
|
|
947
944
|
this.stackTrace.name,
|
|
948
|
-
|
|
945
|
+
error.stack,
|
|
949
946
|
status5.INTERNAL_SERVER_ERROR
|
|
950
947
|
);
|
|
951
948
|
}
|
|
@@ -955,7 +952,7 @@ var InternalErrors = class {
|
|
|
955
952
|
TranslationLoader6.t(this.stackTrace.message, this.localLanguage),
|
|
956
953
|
"ERR_STREAM_DESTROYED",
|
|
957
954
|
this.stackTrace.name,
|
|
958
|
-
|
|
955
|
+
error.stack,
|
|
959
956
|
status5.INTERNAL_SERVER_ERROR
|
|
960
957
|
);
|
|
961
958
|
}
|
|
@@ -965,7 +962,7 @@ var InternalErrors = class {
|
|
|
965
962
|
TranslationLoader6.t(this.stackTrace.message, this.localLanguage),
|
|
966
963
|
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
967
964
|
this.stackTrace.name,
|
|
968
|
-
|
|
965
|
+
error.stack,
|
|
969
966
|
status5.INTERNAL_SERVER_ERROR
|
|
970
967
|
);
|
|
971
968
|
}
|
|
@@ -975,7 +972,7 @@ var InternalErrors = class {
|
|
|
975
972
|
TranslationLoader6.t(this.stackTrace.message, this.localLanguage),
|
|
976
973
|
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
977
974
|
this.stackTrace.name,
|
|
978
|
-
|
|
975
|
+
error.stack,
|
|
979
976
|
status5.INTERNAL_SERVER_ERROR
|
|
980
977
|
);
|
|
981
978
|
}
|
|
@@ -1011,7 +1008,7 @@ var AssertionErrors = class {
|
|
|
1011
1008
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1012
1009
|
"EvalError",
|
|
1013
1010
|
this.stackTrace.name,
|
|
1014
|
-
|
|
1011
|
+
error.stack,
|
|
1015
1012
|
status6.INTERNAL_SERVER_ERROR
|
|
1016
1013
|
);
|
|
1017
1014
|
}
|
|
@@ -1021,7 +1018,7 @@ var AssertionErrors = class {
|
|
|
1021
1018
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1022
1019
|
"RangeError",
|
|
1023
1020
|
this.stackTrace.name,
|
|
1024
|
-
|
|
1021
|
+
error.stack,
|
|
1025
1022
|
status6.INTERNAL_SERVER_ERROR
|
|
1026
1023
|
);
|
|
1027
1024
|
}
|
|
@@ -1031,7 +1028,7 @@ var AssertionErrors = class {
|
|
|
1031
1028
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1032
1029
|
"ReferenceError",
|
|
1033
1030
|
this.stackTrace.name,
|
|
1034
|
-
|
|
1031
|
+
error.stack,
|
|
1035
1032
|
status6.INTERNAL_SERVER_ERROR
|
|
1036
1033
|
);
|
|
1037
1034
|
}
|
|
@@ -1041,7 +1038,7 @@ var AssertionErrors = class {
|
|
|
1041
1038
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1042
1039
|
"SyntaxError",
|
|
1043
1040
|
this.stackTrace.name,
|
|
1044
|
-
|
|
1041
|
+
error.stack,
|
|
1045
1042
|
status6.INTERNAL_SERVER_ERROR
|
|
1046
1043
|
);
|
|
1047
1044
|
}
|
|
@@ -1051,7 +1048,7 @@ var AssertionErrors = class {
|
|
|
1051
1048
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1052
1049
|
"TypeError",
|
|
1053
1050
|
this.stackTrace.name,
|
|
1054
|
-
|
|
1051
|
+
error.stack,
|
|
1055
1052
|
status6.INTERNAL_SERVER_ERROR
|
|
1056
1053
|
);
|
|
1057
1054
|
}
|
|
@@ -1061,7 +1058,7 @@ var AssertionErrors = class {
|
|
|
1061
1058
|
TranslationLoader7.t(this.stackTrace.message, this.localLanguage),
|
|
1062
1059
|
"URIError",
|
|
1063
1060
|
this.stackTrace.name,
|
|
1064
|
-
|
|
1061
|
+
error.stack,
|
|
1065
1062
|
status6.INTERNAL_SERVER_ERROR
|
|
1066
1063
|
);
|
|
1067
1064
|
}
|
package/package.json
CHANGED
package/example/index.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {CLocal, TranslationLoader} from "opticore-translator";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import {ServerListenEventError} from "../src";
|
|
4
|
-
import process from "process";
|
|
5
|
-
|
|
6
|
-
console.log(TranslationLoader.t("rejectionPromise", 'en', { promise: "wd digital" }));
|
|
7
|
-
//console.log("__init is : ", ServerListenEventError.__init());
|
|
8
|
-
|
|
9
|
-
import { fileURLToPath } from 'url';
|
|
10
|
-
|
|
11
|
-
// Convertir l'URL du fichier en chemin de fichier
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
console.log("__filename is : ", __filename);
|
|
14
|
-
|
|
15
|
-
// Obtenir le répertoire du fichier
|
|
16
|
-
(() => {
|
|
17
|
-
const __dirname = path.dirname(__filename);
|
|
18
|
-
const server = ServerListenEventError;
|
|
19
|
-
server.hostPortUndefined("en");
|
|
20
|
-
})()
|