Completed
Push — master ( 2040ba...cef9c4 )
by Vitaly
02:22
created

src/error.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 12
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 2
c 1
b 0
f 0
nc 1
mnd 0
bc 2
fnc 2
dl 0
loc 12
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A error.js ➔ toString 0 3 1
1
function APIError(code, message) {
2
    this.code = code;
3
    this.message = (message || '');
4
}
5
6
Object.setPrototypeOf(APIError.prototype, Error.prototype);
7
APIError.prototype.name = 'APIError';
8
APIError.prototype.toString = function toString() {
9
    return this.code + ' - ' + this.message;
10
};
11
12
export default APIError;