-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy patherrors.ts
54 lines (45 loc) · 1.39 KB
/
errors.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
export class InvalidParametersError extends Error {
static name = 'InvalidParametersError'
static code = 'ERR_INVALID_PARAMS'
name = InvalidParametersError.name
code = InvalidParametersError.code
constructor (message = 'Invalid parameters') {
super(message)
}
}
export class InvalidAvgChunkSizeError extends Error {
static name = 'InvalidAvgChunkSizeError'
static code = 'ERR_INVALID_AVG_CHUNK_SIZE'
name = InvalidAvgChunkSizeError.name
code = InvalidAvgChunkSizeError.code
constructor (message = 'Invalid avg chunk size') {
super(message)
}
}
export class InvalidChunkSizeError extends Error {
static name = 'InvalidChunkSizeError'
static code = 'ERR_INVALID_CHUNK_SIZE'
name = InvalidChunkSizeError.name
code = InvalidChunkSizeError.code
constructor (message = 'Invalid chunk size') {
super(message)
}
}
export class InvalidMinChunkSizeError extends Error {
static name = 'InvalidMinChunkSizeError'
static code = 'ERR_INVALID_MIN_CHUNK_SIZE'
name = InvalidMinChunkSizeError.name
code = InvalidMinChunkSizeError.code
constructor (message = 'Invalid min chunk size') {
super(message)
}
}
export class InvalidContentError extends Error {
static name = 'InvalidContentError'
static code = 'ERR_INVALID_CONTENT'
name = InvalidContentError.name
code = InvalidContentError.code
constructor (message = 'Invalid content') {
super(message)
}
}