src/exceptions/exceptions.js   A
last analyzed

Size

Lines of Code 29

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
nc 1
dl 0
loc 29
rs 10
c 1
b 1
f 0
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A exceptions.js ➔ ??? 0 9 1
1
class InvalidInputException extends Error{
2
	constructor(symbology, input) {
3
		super();
4
		this.name = "InvalidInputException";
5
6
		this.symbology = symbology;
7
		this.input = input;
8
9
		this.message = '"' + this.input + '" is not a valid input for ' + this.symbology;
10
	}
11
}
12
13
class InvalidElementException extends Error{
14
	constructor() {
15
		super();
16
		this.name = "InvalidElementException";
17
		this.message = "Not supported type to render on";
18
	}
19
}
20
21
class NoElementException extends Error{
22
	constructor() {
23
		super();
24
		this.name = "NoElementException";
25
		this.message = "No element to render on.";
26
	}
27
}
28
29
export {InvalidInputException, InvalidElementException, NoElementException};
30