@byloth/core 1.5.0-rc.6 → 1.5.0-rc.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/core.js +158 -107
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +2 -2
- package/dist/core.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -3
- package/src/models/aggregators/aggregated-async-iterator.ts +5 -0
- package/src/models/aggregators/aggregated-iterator.ts +5 -0
- package/src/models/aggregators/reduced-iterator.ts +33 -1
- package/src/models/exceptions/core.ts +31 -0
- package/src/models/exceptions/index.ts +46 -0
- package/src/models/index.ts +15 -1
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import Exception from "./core.js";
|
|
2
2
|
|
|
3
|
+
export class FileNotFoundException extends Exception
|
|
4
|
+
{
|
|
5
|
+
public constructor(message: string, cause?: unknown, name = "FileNotFoundException")
|
|
6
|
+
{
|
|
7
|
+
super(message, cause, name);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public get [Symbol.toStringTag]() { return "FileNotFoundException"; }
|
|
11
|
+
}
|
|
12
|
+
export class NetworkException extends Exception
|
|
13
|
+
{
|
|
14
|
+
public constructor(message: string, cause?: unknown, name = "NetworkException")
|
|
15
|
+
{
|
|
16
|
+
super(message, cause, name);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public get [Symbol.toStringTag]() { return "NetworkException"; }
|
|
20
|
+
}
|
|
21
|
+
export class PermissionException extends Exception
|
|
22
|
+
{
|
|
23
|
+
public constructor(message: string, cause?: unknown, name = "PermissionException")
|
|
24
|
+
{
|
|
25
|
+
super(message, cause, name);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public get [Symbol.toStringTag]() { return "PermissionException"; }
|
|
29
|
+
}
|
|
3
30
|
export class ReferenceException extends Exception
|
|
4
31
|
{
|
|
5
32
|
public constructor(message: string, cause?: unknown, name = "ReferenceException")
|
|
@@ -9,6 +36,15 @@ export class ReferenceException extends Exception
|
|
|
9
36
|
|
|
10
37
|
public get [Symbol.toStringTag]() { return "ReferenceException"; }
|
|
11
38
|
}
|
|
39
|
+
export class RuntimeException extends Exception
|
|
40
|
+
{
|
|
41
|
+
public constructor(message: string, cause?: unknown, name = "RuntimeException")
|
|
42
|
+
{
|
|
43
|
+
super(message, cause, name);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public get [Symbol.toStringTag]() { return "RuntimeException"; }
|
|
47
|
+
}
|
|
12
48
|
export class TimeoutException extends Exception
|
|
13
49
|
{
|
|
14
50
|
public constructor(message: string, cause?: unknown, name = "TimeoutException")
|
|
@@ -18,6 +54,15 @@ export class TimeoutException extends Exception
|
|
|
18
54
|
|
|
19
55
|
public get [Symbol.toStringTag]() { return "TimeoutException"; }
|
|
20
56
|
}
|
|
57
|
+
export class TypeException extends Exception
|
|
58
|
+
{
|
|
59
|
+
public constructor(message: string, cause?: unknown, name = "TypeException")
|
|
60
|
+
{
|
|
61
|
+
super(message, cause, name);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public get [Symbol.toStringTag]() { return "TypeException"; }
|
|
65
|
+
}
|
|
21
66
|
export class ValueException extends Exception
|
|
22
67
|
{
|
|
23
68
|
public constructor(message: string, cause?: unknown, name = "ValueException")
|
|
@@ -29,3 +74,4 @@ export class ValueException extends Exception
|
|
|
29
74
|
}
|
|
30
75
|
|
|
31
76
|
export { Exception };
|
|
77
|
+
export { FatalErrorException, NotImplementedException } from "./core.js";
|
package/src/models/index.ts
CHANGED
|
@@ -7,7 +7,21 @@ export {
|
|
|
7
7
|
|
|
8
8
|
} from "./aggregators/index.js";
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export {
|
|
11
|
+
Exception,
|
|
12
|
+
FatalErrorException,
|
|
13
|
+
NotImplementedException,
|
|
14
|
+
FileNotFoundException,
|
|
15
|
+
NetworkException,
|
|
16
|
+
PermissionException,
|
|
17
|
+
ReferenceException,
|
|
18
|
+
RuntimeException,
|
|
19
|
+
TimeoutException,
|
|
20
|
+
TypeException,
|
|
21
|
+
ValueException
|
|
22
|
+
|
|
23
|
+
} from "./exceptions/index.js";
|
|
24
|
+
|
|
11
25
|
export { SmartIterator, SmartAsyncIterator } from "./iterators/index.js";
|
|
12
26
|
|
|
13
27
|
import JsonStorage from "./json-storage.js";
|