@nu-art/ts-common 0.200.131 → 0.200.133

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.
@@ -132,3 +132,4 @@ export declare class WhoCallthisException extends CustomException {
132
132
  export declare class AssertionException extends CustomException {
133
133
  constructor(message: string, cause?: Error);
134
134
  }
135
+ export declare function isCustomException(e: Error): boolean;
@@ -20,7 +20,7 @@
20
20
  * Created by TacB0sS on 3/16/17.
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.AssertionException = exports.WhoCallthisException = exports.DontCallthisException = exports.HasDependenciesException = exports.ThisShouldNotHappenException = exports.NotImplementedYetException = exports.MUSTNeverHappenException = exports.ImplementationMissingException = exports.BadImplementationException = exports.Exception = exports.CustomException = exports.isErrorOfType = void 0;
23
+ exports.isCustomException = exports.AssertionException = exports.WhoCallthisException = exports.DontCallthisException = exports.HasDependenciesException = exports.ThisShouldNotHappenException = exports.NotImplementedYetException = exports.MUSTNeverHappenException = exports.ImplementationMissingException = exports.BadImplementationException = exports.Exception = exports.CustomException = exports.isErrorOfType = void 0;
24
24
  /**
25
25
  * # <ins>isErrorOfType</ins>
26
26
  *
@@ -192,3 +192,18 @@ class AssertionException extends CustomException {
192
192
  }
193
193
  }
194
194
  exports.AssertionException = AssertionException;
195
+ const allExceptions = [
196
+ Exception,
197
+ BadImplementationException,
198
+ ImplementationMissingException,
199
+ MUSTNeverHappenException,
200
+ NotImplementedYetException,
201
+ ThisShouldNotHappenException,
202
+ DontCallthisException,
203
+ WhoCallthisException,
204
+ AssertionException,
205
+ ];
206
+ function isCustomException(e) {
207
+ return allExceptions.some(exc => !!isErrorOfType(e, exc));
208
+ }
209
+ exports.isCustomException = isCustomException;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/ts-common",
3
- "version": "0.200.131",
3
+ "version": "0.200.133",
4
4
  "description": "js and ts infra",
5
5
  "keywords": [
6
6
  "TacB0sS",