-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy patherrors.js
34 lines (29 loc) · 918 Bytes
/
errors.js
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
export class InsufficientRollupData {
constructor(dimension, id) {
this.message = `Can't add member, member for rollup dimension: ${dimension} with id: ${id} not found`;
}
}
export class NotFoundFactId {
constructor(name) {
this.message = `In fact data, no property was found with the name: ${name}`
}
}
export class NotCompletelySpaceException {
constructor(dimension) {
this.message = `Not completely defined space for added member, not found member for dimension: "${dimension}"`;
}
}
export class CantAddMemberRollupException {
constructor(dimension, id) {
this.message = `Can't add member, rollup dimension: ${dimension} with id: ${id} not found`;
}
}
export class DimensionException {
constructor(dimension) {
this.message = `For the name "${dimension}" the dimension is already set`;
}
}
export const handleError = error => {
error.message = `[Cube] ${error.message}`
throw error;
};