@rightcapital/exceptions 1.2.0
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/README.md +38 -0
- package/lib/exceptions/bad-function-call.exception.d.ts +5 -0
- package/lib/exceptions/bad-function-call.exception.d.ts.map +1 -0
- package/lib/exceptions/bad-function-call.exception.js +12 -0
- package/lib/exceptions/bad-function-call.exception.js.map +1 -0
- package/lib/exceptions/bad-method-call.exception.d.ts +5 -0
- package/lib/exceptions/bad-method-call.exception.d.ts.map +1 -0
- package/lib/exceptions/bad-method-call.exception.js +12 -0
- package/lib/exceptions/bad-method-call.exception.js.map +1 -0
- package/lib/exceptions/base.exception.d.ts +6 -0
- package/lib/exceptions/base.exception.d.ts.map +1 -0
- package/lib/exceptions/base.exception.js +14 -0
- package/lib/exceptions/base.exception.js.map +1 -0
- package/lib/exceptions/domain.exception.d.ts +5 -0
- package/lib/exceptions/domain.exception.d.ts.map +1 -0
- package/lib/exceptions/domain.exception.js +12 -0
- package/lib/exceptions/domain.exception.js.map +1 -0
- package/lib/exceptions/ignorable.exception.d.ts +5 -0
- package/lib/exceptions/ignorable.exception.d.ts.map +1 -0
- package/lib/exceptions/ignorable.exception.js +12 -0
- package/lib/exceptions/ignorable.exception.js.map +1 -0
- package/lib/exceptions/invalid-argument.exception.d.ts +5 -0
- package/lib/exceptions/invalid-argument.exception.d.ts.map +1 -0
- package/lib/exceptions/invalid-argument.exception.js +12 -0
- package/lib/exceptions/invalid-argument.exception.js.map +1 -0
- package/lib/exceptions/length.exception.d.ts +5 -0
- package/lib/exceptions/length.exception.d.ts.map +1 -0
- package/lib/exceptions/length.exception.js +12 -0
- package/lib/exceptions/length.exception.js.map +1 -0
- package/lib/exceptions/logic.exception.d.ts +5 -0
- package/lib/exceptions/logic.exception.d.ts.map +1 -0
- package/lib/exceptions/logic.exception.js +12 -0
- package/lib/exceptions/logic.exception.js.map +1 -0
- package/lib/exceptions/out-of-bounds.exception.d.ts +5 -0
- package/lib/exceptions/out-of-bounds.exception.d.ts.map +1 -0
- package/lib/exceptions/out-of-bounds.exception.js +12 -0
- package/lib/exceptions/out-of-bounds.exception.js.map +1 -0
- package/lib/exceptions/out-of-range.exception.d.ts +5 -0
- package/lib/exceptions/out-of-range.exception.d.ts.map +1 -0
- package/lib/exceptions/out-of-range.exception.js +12 -0
- package/lib/exceptions/out-of-range.exception.js.map +1 -0
- package/lib/exceptions/overflow.exception.d.ts +5 -0
- package/lib/exceptions/overflow.exception.d.ts.map +1 -0
- package/lib/exceptions/overflow.exception.js +12 -0
- package/lib/exceptions/overflow.exception.js.map +1 -0
- package/lib/exceptions/range.exception.d.ts +5 -0
- package/lib/exceptions/range.exception.d.ts.map +1 -0
- package/lib/exceptions/range.exception.js +12 -0
- package/lib/exceptions/range.exception.js.map +1 -0
- package/lib/exceptions/runtime.exception.d.ts +5 -0
- package/lib/exceptions/runtime.exception.d.ts.map +1 -0
- package/lib/exceptions/runtime.exception.js +12 -0
- package/lib/exceptions/runtime.exception.js.map +1 -0
- package/lib/exceptions/underflow.exception.d.ts +5 -0
- package/lib/exceptions/underflow.exception.d.ts.map +1 -0
- package/lib/exceptions/underflow.exception.js +12 -0
- package/lib/exceptions/underflow.exception.js.map +1 -0
- package/lib/exceptions/unexpected-value.exception.d.ts +5 -0
- package/lib/exceptions/unexpected-value.exception.d.ts.map +1 -0
- package/lib/exceptions/unexpected-value.exception.js +12 -0
- package/lib/exceptions/unexpected-value.exception.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +34 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `exceptions`
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
This library provides a set of standard Exceptions
|
|
6
|
+
|
|
7
|
+
It is inspired by the [PHP's SPL exceptions](https://www.php.net/manual/en/spl.exceptions.php)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @right/exceptions
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { RuntimeException, LogicException } from '@rightcapital/exceptions';
|
|
19
|
+
|
|
20
|
+
const logicException = new LogicException('A logic exception');
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
// Something
|
|
24
|
+
throw new RuntimeException('Crash!', logicException);
|
|
25
|
+
} catch (exception) {
|
|
26
|
+
if (exception instanceof RuntimeException) {
|
|
27
|
+
//.... BlaBlaBla
|
|
28
|
+
if (exception.isCausedBy(logicException)) {
|
|
29
|
+
console.log(
|
|
30
|
+
'Catch you!',
|
|
31
|
+
exception.name,
|
|
32
|
+
', You are caused by',
|
|
33
|
+
exception.cause.name,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-function-call.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/bad-function-call.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,IAAI,SAA8B;CACnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadFunctionCallException = void 0;
|
|
4
|
+
const logic_exception_1 = require("./logic.exception");
|
|
5
|
+
class BadFunctionCallException extends logic_exception_1.LogicException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'BadFunctionCallException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.BadFunctionCallException = BadFunctionCallException;
|
|
12
|
+
//# sourceMappingURL=bad-function-call.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-function-call.exception.js","sourceRoot":"","sources":["../../src/exceptions/bad-function-call.exception.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAMnD,MAAa,wBAAyB,SAAQ,gCAAc;IAA5D;;QACE,SAAI,GAAG,0BAA0B,CAAC;IACpC,CAAC;CAAA;AAFD,4DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-method-call.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/bad-method-call.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAMzE,qBAAa,sBAAuB,SAAQ,wBAAwB;IAClE,IAAI,SAA4B;CACjC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadMethodCallException = void 0;
|
|
4
|
+
const bad_function_call_exception_1 = require("./bad-function-call.exception");
|
|
5
|
+
class BadMethodCallException extends bad_function_call_exception_1.BadFunctionCallException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'BadMethodCallException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.BadMethodCallException = BadMethodCallException;
|
|
12
|
+
//# sourceMappingURL=bad-method-call.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-method-call.exception.js","sourceRoot":"","sources":["../../src/exceptions/bad-method-call.exception.ts"],"names":[],"mappings":";;;AAAA,+EAAyE;AAMzE,MAAa,sBAAuB,SAAQ,sDAAwB;IAApE;;QACE,SAAI,GAAG,wBAAwB,CAAC;IAClC,CAAC;CAAA;AAFD,wDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts"],"names":[],"mappings":"AAQA,qBAAa,aAAc,SAAQ,KAAK;IAO7B,KAAK,CAAC,EAAE,GAAG;gBADlB,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,GAAG;IAWb,UAAU,CAAC,KAAK,KAAA;CAGxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseException = void 0;
|
|
4
|
+
class BaseException extends Error {
|
|
5
|
+
constructor(message, cause) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.cause = cause;
|
|
8
|
+
}
|
|
9
|
+
isCausedBy(cause) {
|
|
10
|
+
return cause === this.cause;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.BaseException = BaseException;
|
|
14
|
+
//# sourceMappingURL=base.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.exception.js","sourceRoot":"","sources":["../../src/exceptions/base.exception.ts"],"names":[],"mappings":";;;AAQA,MAAa,aAAc,SAAQ,KAAK;IAKtC,YACE,OAAe,EACR,KAAW;QAElB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,UAAK,GAAL,KAAK,CAAM;IAGpB,CAAC;IAQM,UAAU,CAAC,KAAK;QACrB,OAAO,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IAC9B,CAAC;CACF;AArBD,sCAqBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/domain.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,eAAgB,SAAQ,cAAc;IACjD,IAAI,SAAqB;CAC1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DomainException = void 0;
|
|
4
|
+
const logic_exception_1 = require("./logic.exception");
|
|
5
|
+
class DomainException extends logic_exception_1.LogicException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'DomainException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DomainException = DomainException;
|
|
12
|
+
//# sourceMappingURL=domain.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.exception.js","sourceRoot":"","sources":["../../src/exceptions/domain.exception.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAMnD,MAAa,eAAgB,SAAQ,gCAAc;IAAnD;;QACE,SAAI,GAAG,iBAAiB,CAAC;IAC3B,CAAC;CAAA;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignorable.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/ignorable.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,SAAwB;CAC7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IgnorableException = void 0;
|
|
4
|
+
const base_exception_1 = require("./base.exception");
|
|
5
|
+
class IgnorableException extends base_exception_1.BaseException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'IgnorableException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.IgnorableException = IgnorableException;
|
|
12
|
+
//# sourceMappingURL=ignorable.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignorable.exception.js","sourceRoot":"","sources":["../../src/exceptions/ignorable.exception.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAMjD,MAAa,kBAAmB,SAAQ,8BAAa;IAArD;;QACE,SAAI,GAAG,oBAAoB,CAAC;IAC9B,CAAC;CAAA;AAFD,gDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-argument.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/invalid-argument.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,IAAI,SAA8B;CACnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidArgumentException = void 0;
|
|
4
|
+
const logic_exception_1 = require("./logic.exception");
|
|
5
|
+
class InvalidArgumentException extends logic_exception_1.LogicException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'InvalidArgumentException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.InvalidArgumentException = InvalidArgumentException;
|
|
12
|
+
//# sourceMappingURL=invalid-argument.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-argument.exception.js","sourceRoot":"","sources":["../../src/exceptions/invalid-argument.exception.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAMnD,MAAa,wBAAyB,SAAQ,gCAAc;IAA5D;;QACE,SAAI,GAAG,0BAA0B,CAAC;IACpC,CAAC;CAAA;AAFD,4DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/length.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,eAAgB,SAAQ,cAAc;IACjD,IAAI,SAAqB;CAC1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LengthException = void 0;
|
|
4
|
+
const logic_exception_1 = require("./logic.exception");
|
|
5
|
+
class LengthException extends logic_exception_1.LogicException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'LengthException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.LengthException = LengthException;
|
|
12
|
+
//# sourceMappingURL=length.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.exception.js","sourceRoot":"","sources":["../../src/exceptions/length.exception.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAMnD,MAAa,eAAgB,SAAQ,gCAAc;IAAnD;;QACE,SAAI,GAAG,iBAAiB,CAAC;IAC3B,CAAC;CAAA;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/logic.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,qBAAa,cAAe,SAAQ,aAAa;IAC/C,IAAI,SAAoB;CACzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicException = void 0;
|
|
4
|
+
const base_exception_1 = require("./base.exception");
|
|
5
|
+
class LogicException extends base_exception_1.BaseException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'LogicException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.LogicException = LogicException;
|
|
12
|
+
//# sourceMappingURL=logic.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.exception.js","sourceRoot":"","sources":["../../src/exceptions/logic.exception.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAMjD,MAAa,cAAe,SAAQ,8BAAa;IAAjD;;QACE,SAAI,GAAG,gBAAgB,CAAC;IAC1B,CAAC;CAAA;AAFD,wCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"out-of-bounds.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/out-of-bounds.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,qBAAa,oBAAqB,SAAQ,gBAAgB;IACxD,IAAI,SAA0B;CAC/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OutOfBoundsException = void 0;
|
|
4
|
+
const runtime_exception_1 = require("./runtime.exception");
|
|
5
|
+
class OutOfBoundsException extends runtime_exception_1.RuntimeException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'OutOfBoundsException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.OutOfBoundsException = OutOfBoundsException;
|
|
12
|
+
//# sourceMappingURL=out-of-bounds.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"out-of-bounds.exception.js","sourceRoot":"","sources":["../../src/exceptions/out-of-bounds.exception.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAMvD,MAAa,oBAAqB,SAAQ,oCAAgB;IAA1D;;QACE,SAAI,GAAG,sBAAsB,CAAC;IAChC,CAAC;CAAA;AAFD,oDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"out-of-range.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/out-of-range.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,IAAI,SAAyB;CAC9B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OutOfRangeException = void 0;
|
|
4
|
+
const logic_exception_1 = require("./logic.exception");
|
|
5
|
+
class OutOfRangeException extends logic_exception_1.LogicException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'OutOfRangeException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.OutOfRangeException = OutOfRangeException;
|
|
12
|
+
//# sourceMappingURL=out-of-range.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"out-of-range.exception.js","sourceRoot":"","sources":["../../src/exceptions/out-of-range.exception.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAMnD,MAAa,mBAAoB,SAAQ,gCAAc;IAAvD;;QACE,SAAI,GAAG,qBAAqB,CAAC;IAC/B,CAAC;CAAA;AAFD,kDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/overflow.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,IAAI,SAAuB;CAC5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OverflowException = void 0;
|
|
4
|
+
const runtime_exception_1 = require("./runtime.exception");
|
|
5
|
+
class OverflowException extends runtime_exception_1.RuntimeException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'OverflowException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.OverflowException = OverflowException;
|
|
12
|
+
//# sourceMappingURL=overflow.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow.exception.js","sourceRoot":"","sources":["../../src/exceptions/overflow.exception.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAMvD,MAAa,iBAAkB,SAAQ,oCAAgB;IAAvD;;QACE,SAAI,GAAG,mBAAmB,CAAC;IAC7B,CAAC;CAAA;AAFD,8CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/range.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAOvD,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,IAAI,SAAoB;CACzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RangeException = void 0;
|
|
4
|
+
const runtime_exception_1 = require("./runtime.exception");
|
|
5
|
+
class RangeException extends runtime_exception_1.RuntimeException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'RangeException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.RangeException = RangeException;
|
|
12
|
+
//# sourceMappingURL=range.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.exception.js","sourceRoot":"","sources":["../../src/exceptions/range.exception.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAOvD,MAAa,cAAe,SAAQ,oCAAgB;IAApD;;QACE,SAAI,GAAG,gBAAgB,CAAC;IAC1B,CAAC;CAAA;AAFD,wCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/runtime.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,IAAI,SAAsB;CAC3B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuntimeException = void 0;
|
|
4
|
+
const base_exception_1 = require("./base.exception");
|
|
5
|
+
class RuntimeException extends base_exception_1.BaseException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'RuntimeException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.RuntimeException = RuntimeException;
|
|
12
|
+
//# sourceMappingURL=runtime.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.exception.js","sourceRoot":"","sources":["../../src/exceptions/runtime.exception.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAMjD,MAAa,gBAAiB,SAAQ,8BAAa;IAAnD;;QACE,SAAI,GAAG,kBAAkB,CAAC;IAC5B,CAAC;CAAA;AAFD,4CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"underflow.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/underflow.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,IAAI,SAAwB;CAC7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnderflowException = void 0;
|
|
4
|
+
const runtime_exception_1 = require("./runtime.exception");
|
|
5
|
+
class UnderflowException extends runtime_exception_1.RuntimeException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'UnderflowException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.UnderflowException = UnderflowException;
|
|
12
|
+
//# sourceMappingURL=underflow.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"underflow.exception.js","sourceRoot":"","sources":["../../src/exceptions/underflow.exception.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAMvD,MAAa,kBAAmB,SAAQ,oCAAgB;IAAxD;;QACE,SAAI,GAAG,oBAAoB,CAAC;IAC9B,CAAC;CAAA;AAFD,gDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unexpected-value.exception.d.ts","sourceRoot":"","sources":["../../src/exceptions/unexpected-value.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,qBAAa,wBAAyB,SAAQ,aAAa;IACzD,IAAI,SAA8B;CACnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnexpectedValueException = void 0;
|
|
4
|
+
const base_exception_1 = require("./base.exception");
|
|
5
|
+
class UnexpectedValueException extends base_exception_1.BaseException {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'UnexpectedValueException';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.UnexpectedValueException = UnexpectedValueException;
|
|
12
|
+
//# sourceMappingURL=unexpected-value.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unexpected-value.exception.js","sourceRoot":"","sources":["../../src/exceptions/unexpected-value.exception.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAQjD,MAAa,wBAAyB,SAAQ,8BAAa;IAA3D;;QACE,SAAI,GAAG,0BAA0B,CAAC;IACpC,CAAC;CAAA;AAFD,4DAEC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { BadFunctionCallException } from './exceptions/bad-function-call.exception';
|
|
2
|
+
export { BadMethodCallException } from './exceptions/bad-method-call.exception';
|
|
3
|
+
export { BaseException } from './exceptions/base.exception';
|
|
4
|
+
export { DomainException } from './exceptions/domain.exception';
|
|
5
|
+
export { IgnorableException } from './exceptions/ignorable.exception';
|
|
6
|
+
export { InvalidArgumentException } from './exceptions/invalid-argument.exception';
|
|
7
|
+
export { LengthException } from './exceptions/length.exception';
|
|
8
|
+
export { LogicException } from './exceptions/logic.exception';
|
|
9
|
+
export { OutOfBoundsException } from './exceptions/out-of-bounds.exception';
|
|
10
|
+
export { OutOfRangeException } from './exceptions/out-of-range.exception';
|
|
11
|
+
export { OverflowException } from './exceptions/overflow.exception';
|
|
12
|
+
export { RangeException } from './exceptions/range.exception';
|
|
13
|
+
export { RuntimeException } from './exceptions/runtime.exception';
|
|
14
|
+
export { UnderflowException } from './exceptions/underflow.exception';
|
|
15
|
+
export { UnexpectedValueException } from './exceptions/unexpected-value.exception';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnexpectedValueException = exports.UnderflowException = exports.RuntimeException = exports.RangeException = exports.OverflowException = exports.OutOfRangeException = exports.OutOfBoundsException = exports.LogicException = exports.LengthException = exports.InvalidArgumentException = exports.IgnorableException = exports.DomainException = exports.BaseException = exports.BadMethodCallException = exports.BadFunctionCallException = void 0;
|
|
4
|
+
var bad_function_call_exception_1 = require("./exceptions/bad-function-call.exception");
|
|
5
|
+
Object.defineProperty(exports, "BadFunctionCallException", { enumerable: true, get: function () { return bad_function_call_exception_1.BadFunctionCallException; } });
|
|
6
|
+
var bad_method_call_exception_1 = require("./exceptions/bad-method-call.exception");
|
|
7
|
+
Object.defineProperty(exports, "BadMethodCallException", { enumerable: true, get: function () { return bad_method_call_exception_1.BadMethodCallException; } });
|
|
8
|
+
var base_exception_1 = require("./exceptions/base.exception");
|
|
9
|
+
Object.defineProperty(exports, "BaseException", { enumerable: true, get: function () { return base_exception_1.BaseException; } });
|
|
10
|
+
var domain_exception_1 = require("./exceptions/domain.exception");
|
|
11
|
+
Object.defineProperty(exports, "DomainException", { enumerable: true, get: function () { return domain_exception_1.DomainException; } });
|
|
12
|
+
var ignorable_exception_1 = require("./exceptions/ignorable.exception");
|
|
13
|
+
Object.defineProperty(exports, "IgnorableException", { enumerable: true, get: function () { return ignorable_exception_1.IgnorableException; } });
|
|
14
|
+
var invalid_argument_exception_1 = require("./exceptions/invalid-argument.exception");
|
|
15
|
+
Object.defineProperty(exports, "InvalidArgumentException", { enumerable: true, get: function () { return invalid_argument_exception_1.InvalidArgumentException; } });
|
|
16
|
+
var length_exception_1 = require("./exceptions/length.exception");
|
|
17
|
+
Object.defineProperty(exports, "LengthException", { enumerable: true, get: function () { return length_exception_1.LengthException; } });
|
|
18
|
+
var logic_exception_1 = require("./exceptions/logic.exception");
|
|
19
|
+
Object.defineProperty(exports, "LogicException", { enumerable: true, get: function () { return logic_exception_1.LogicException; } });
|
|
20
|
+
var out_of_bounds_exception_1 = require("./exceptions/out-of-bounds.exception");
|
|
21
|
+
Object.defineProperty(exports, "OutOfBoundsException", { enumerable: true, get: function () { return out_of_bounds_exception_1.OutOfBoundsException; } });
|
|
22
|
+
var out_of_range_exception_1 = require("./exceptions/out-of-range.exception");
|
|
23
|
+
Object.defineProperty(exports, "OutOfRangeException", { enumerable: true, get: function () { return out_of_range_exception_1.OutOfRangeException; } });
|
|
24
|
+
var overflow_exception_1 = require("./exceptions/overflow.exception");
|
|
25
|
+
Object.defineProperty(exports, "OverflowException", { enumerable: true, get: function () { return overflow_exception_1.OverflowException; } });
|
|
26
|
+
var range_exception_1 = require("./exceptions/range.exception");
|
|
27
|
+
Object.defineProperty(exports, "RangeException", { enumerable: true, get: function () { return range_exception_1.RangeException; } });
|
|
28
|
+
var runtime_exception_1 = require("./exceptions/runtime.exception");
|
|
29
|
+
Object.defineProperty(exports, "RuntimeException", { enumerable: true, get: function () { return runtime_exception_1.RuntimeException; } });
|
|
30
|
+
var underflow_exception_1 = require("./exceptions/underflow.exception");
|
|
31
|
+
Object.defineProperty(exports, "UnderflowException", { enumerable: true, get: function () { return underflow_exception_1.UnderflowException; } });
|
|
32
|
+
var unexpected_value_exception_1 = require("./exceptions/unexpected-value.exception");
|
|
33
|
+
Object.defineProperty(exports, "UnexpectedValueException", { enumerable: true, get: function () { return unexpected_value_exception_1.UnexpectedValueException; } });
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wFAAoF;AAA3E,uIAAA,wBAAwB,OAAA;AACjC,oFAAgF;AAAvE,mIAAA,sBAAsB,OAAA;AAC/B,8DAA4D;AAAnD,+GAAA,aAAa,OAAA;AACtB,kEAAgE;AAAvD,mHAAA,eAAe,OAAA;AACxB,wEAAsE;AAA7D,yHAAA,kBAAkB,OAAA;AAC3B,sFAAmF;AAA1E,sIAAA,wBAAwB,OAAA;AACjC,kEAAgE;AAAvD,mHAAA,eAAe,OAAA;AACxB,gEAA8D;AAArD,iHAAA,cAAc,OAAA;AACvB,gFAA4E;AAAnE,+HAAA,oBAAoB,OAAA;AAC7B,8EAA0E;AAAjE,6HAAA,mBAAmB,OAAA;AAC5B,sEAAoE;AAA3D,uHAAA,iBAAiB,OAAA;AAC1B,gEAA8D;AAArD,iHAAA,cAAc,OAAA;AACvB,oEAAkE;AAAzD,qHAAA,gBAAgB,OAAA;AACzB,wEAAsE;AAA7D,yHAAA,kBAAkB,OAAA;AAC3B,sFAAmF;AAA1E,sIAAA,wBAAwB,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.37.0"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rightcapital/exceptions",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "TypeScript Exception definitions inspired by PHP SPL Exceptions etc...",
|
|
5
|
+
"author": "RightCapital Ecosystem team <npm-publisher@rightcapital.com>",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"Exception",
|
|
8
|
+
"Error",
|
|
9
|
+
"TypeScript"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://www.rightcapital.com",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"packageManager": "pnpm@8.7.6",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"typings": "lib/index.d.ts",
|
|
16
|
+
"directories": {
|
|
17
|
+
"lib": "lib",
|
|
18
|
+
"test": "__tests__"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "jest",
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"docs": "pnpm exec typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts",
|
|
27
|
+
"eslint": "eslint --cache 'src/**/*.ts*'",
|
|
28
|
+
"lint": "pnpm prettier && pnpm eslint",
|
|
29
|
+
"lint:fix": "pnpm prettier --write && eslint 'src/**/*.ts*' --fix",
|
|
30
|
+
"prettier": "prettier \"{src,__tests__}/**/*.{tsx,ts}\" -l"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"prettier": "3.0.3",
|
|
34
|
+
"typedoc": "0.25.1",
|
|
35
|
+
"typedoc-plugin-markdown": "3.16.0"
|
|
36
|
+
}
|
|
37
|
+
}
|