opticore-catch-exception-error 1.0.16 → 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 CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  JavaScriptErrors: () => JavaScriptErrors,
39
39
  OpenSSLErrors: () => OpenSSLErrors,
40
40
  ServerListenEventError: () => ServerListenEventError,
41
+ StackTraceError: () => StackTraceError,
41
42
  SystemErrors: () => SystemErrors
42
43
  });
43
44
  module.exports = __toCommonJS(index_exports);
@@ -1127,5 +1128,6 @@ var AssertionErrors = class {
1127
1128
  JavaScriptErrors,
1128
1129
  OpenSSLErrors,
1129
1130
  ServerListenEventError,
1131
+ StackTraceError,
1130
1132
  SystemErrors
1131
1133
  });
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import EventEmitter from 'node:events';
2
2
  import { Request, Response, NextFunction } from 'opticore-express';
3
+ import { HttpStatusCode } from 'opticore-http-response';
3
4
 
4
5
  declare const CErrorName: {
5
6
  assertionError: string;
@@ -252,4 +253,21 @@ declare class AssertionErrors {
252
253
  private traceError;
253
254
  }
254
255
 
255
- export { AssertionErrors, CErrorName, CEvent, CEventNameError, InternalErrors, JavaScriptErrors, OpenSSLErrors, ServerListenEventError, SystemErrors };
256
+ /**
257
+ * Handling and catch a Node.js error.
258
+ */
259
+ declare class StackTraceError extends Error {
260
+ readonly name: string;
261
+ readonly httpCode: HttpStatusCode | any;
262
+ readonly isOperational: boolean;
263
+ /**
264
+ *
265
+ * @param props
266
+ * @param name
267
+ * @param httpCode
268
+ * @param isOperational
269
+ */
270
+ constructor(props: string | undefined, name: string, httpCode: HttpStatusCode | any, isOperational: boolean);
271
+ }
272
+
273
+ export { AssertionErrors, CErrorName, CEvent, CEventNameError, InternalErrors, JavaScriptErrors, OpenSSLErrors, ServerListenEventError, StackTraceError, SystemErrors };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import EventEmitter from 'node:events';
2
2
  import { Request, Response, NextFunction } from 'opticore-express';
3
+ import { HttpStatusCode } from 'opticore-http-response';
3
4
 
4
5
  declare const CErrorName: {
5
6
  assertionError: string;
@@ -252,4 +253,21 @@ declare class AssertionErrors {
252
253
  private traceError;
253
254
  }
254
255
 
255
- export { AssertionErrors, CErrorName, CEvent, CEventNameError, InternalErrors, JavaScriptErrors, OpenSSLErrors, ServerListenEventError, SystemErrors };
256
+ /**
257
+ * Handling and catch a Node.js error.
258
+ */
259
+ declare class StackTraceError extends Error {
260
+ readonly name: string;
261
+ readonly httpCode: HttpStatusCode | any;
262
+ readonly isOperational: boolean;
263
+ /**
264
+ *
265
+ * @param props
266
+ * @param name
267
+ * @param httpCode
268
+ * @param isOperational
269
+ */
270
+ constructor(props: string | undefined, name: string, httpCode: HttpStatusCode | any, isOperational: boolean);
271
+ }
272
+
273
+ export { AssertionErrors, CErrorName, CEvent, CEventNameError, InternalErrors, JavaScriptErrors, OpenSSLErrors, ServerListenEventError, StackTraceError, SystemErrors };
package/dist/index.js CHANGED
@@ -1078,5 +1078,6 @@ export {
1078
1078
  JavaScriptErrors,
1079
1079
  OpenSSLErrors,
1080
1080
  ServerListenEventError,
1081
+ StackTraceError,
1081
1082
  SystemErrors
1082
1083
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-catch-exception-error",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "opticore catch exception error",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",