1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | class LuxonError extends Error {}
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export class InvalidDateTimeError extends LuxonError {
|
12 | constructor(reason) {
|
13 | super(`Invalid DateTime: ${reason.toMessage()}`);
|
14 | }
|
15 | }
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export class InvalidIntervalError extends LuxonError {
|
21 | constructor(reason) {
|
22 | super(`Invalid Interval: ${reason.toMessage()}`);
|
23 | }
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export class InvalidDurationError extends LuxonError {
|
30 | constructor(reason) {
|
31 | super(`Invalid Duration: ${reason.toMessage()}`);
|
32 | }
|
33 | }
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | export class ConflictingSpecificationError extends LuxonError {}
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | export class InvalidUnitError extends LuxonError {
|
44 | constructor(unit) {
|
45 | super(`Invalid unit ${unit}`);
|
46 | }
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | export class InvalidArgumentError extends LuxonError {}
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | export class ZoneIsAbstractError extends LuxonError {
|
58 | constructor() {
|
59 | super("Zone is an abstract class");
|
60 | }
|
61 | }
|