UNPKG

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