diff options
author | Manuel Luis SanmartĂn Rozada | 2014-08-01 00:26:22 +0200 |
---|---|---|
committer | Pim van den Berg | 2014-08-02 12:29:56 +0200 |
commit | 8bae559da5cf426bb5dfd0a88942d47b7011fcae (patch) | |
tree | 4333cda187ab9e8317d6f4aa235df99b324eea01 /js | |
parent | jsrrdgraph: Fix reduce in DEF (diff) | |
download | apt-panopticon_cgp-8bae559da5cf426bb5dfd0a88942d47b7011fcae.zip apt-panopticon_cgp-8bae559da5cf426bb5dfd0a88942d47b7011fcae.tar.gz apt-panopticon_cgp-8bae559da5cf426bb5dfd0a88942d47b7011fcae.tar.bz2 apt-panopticon_cgp-8bae559da5cf426bb5dfd0a88942d47b7011fcae.tar.xz |
jsrrdgraph: Fix error functions. Error prototype.
Diffstat (limited to 'js')
-rw-r--r-- | js/Color.js | 2 | ||||
-rw-r--r-- | js/RrdGraph.js | 7 | ||||
-rw-r--r-- | js/RrdRpn.js | 2 | ||||
-rw-r--r-- | js/RrdTime.js | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/js/Color.js b/js/Color.js index e294f65..066e1a1 100644 --- a/js/Color.js +++ b/js/Color.js | |||
@@ -24,10 +24,10 @@ | |||
24 | */ | 24 | */ |
25 | var ColorError = function (message) | 25 | var ColorError = function (message) |
26 | { | 26 | { |
27 | this.prototype = Error.prototype; | ||
28 | this.name = "ColorError"; | 27 | this.name = "ColorError"; |
29 | this.message = (message) ? message : "Error"; | 28 | this.message = (message) ? message : "Error"; |
30 | }; | 29 | }; |
30 | ColorError.prototype = new Error(); | ||
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Color | 33 | * Color |
diff --git a/js/RrdGraph.js b/js/RrdGraph.js index 48b9814..a3b0124 100644 --- a/js/RrdGraph.js +++ b/js/RrdGraph.js | |||
@@ -27,10 +27,10 @@ | |||
27 | */ | 27 | */ |
28 | var RrdGraphDescError = function (message) | 28 | var RrdGraphDescError = function (message) |
29 | { | 29 | { |
30 | this.prototype = Error.prototype; | ||
31 | this.name = "RrdGraphDescError"; | 30 | this.name = "RrdGraphDescError"; |
32 | this.message = (message) ? message : "Error"; | 31 | this.message = (message) ? message : "Error"; |
33 | }; | 32 | }; |
33 | RrdGraphDescError.prototype = new Error(); | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * RrdGraphDesc | 36 | * RrdGraphDesc |
@@ -393,10 +393,11 @@ RrdGraphDesc.prototype.hrule = function (graph, value, color, legend) | |||
393 | */ | 393 | */ |
394 | var RrdVdefError = function (message) | 394 | var RrdVdefError = function (message) |
395 | { | 395 | { |
396 | this.prototype = Error.prototype; | ||
397 | this.name = "RrdVdefError"; | 396 | this.name = "RrdVdefError"; |
398 | this.message = (message) ? message : "Error"; | 397 | this.message = (message) ? message : "Error"; |
399 | }; | 398 | }; |
399 | RrdVdefError.prototype = new Error(); | ||
400 | |||
400 | 401 | ||
401 | /** | 402 | /** |
402 | * RrdVdef | 403 | * RrdVdef |
@@ -694,10 +695,10 @@ RrdVdef.prototype.calc = function(src) | |||
694 | */ | 695 | */ |
695 | var RrdGraphError = function (message) | 696 | var RrdGraphError = function (message) |
696 | { | 697 | { |
697 | this.prototype = Error.prototype; | ||
698 | this.name = "RrdGraphError"; | 698 | this.name = "RrdGraphError"; |
699 | this.message = (message) ? message : "Error"; | 699 | this.message = (message) ? message : "Error"; |
700 | }; | 700 | }; |
701 | RrdGraphError.prototype = new Error(); | ||
701 | 702 | ||
702 | /** | 703 | /** |
703 | * RrdGraph | 704 | * RrdGraph |
diff --git a/js/RrdRpn.js b/js/RrdRpn.js index 5ca8daf..3eb4e4a 100644 --- a/js/RrdRpn.js +++ b/js/RrdRpn.js | |||
@@ -27,10 +27,10 @@ | |||
27 | */ | 27 | */ |
28 | var RrdRpnError = function (message) | 28 | var RrdRpnError = function (message) |
29 | { | 29 | { |
30 | this.prototype = Error.prototype; | ||
31 | this.name = "RrdRpnError"; | 30 | this.name = "RrdRpnError"; |
32 | this.message = (message) ? message : "RPN stack underflow"; | 31 | this.message = (message) ? message : "RPN stack underflow"; |
33 | }; | 32 | }; |
33 | RrdRpnError.prototype = new Error(); | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * RrdRpn | 36 | * RrdRpn |
diff --git a/js/RrdTime.js b/js/RrdTime.js index c1de1fc..9010ece 100644 --- a/js/RrdTime.js +++ b/js/RrdTime.js | |||
@@ -27,10 +27,10 @@ | |||
27 | */ | 27 | */ |
28 | var RrdTimeError = function (message) | 28 | var RrdTimeError = function (message) |
29 | { | 29 | { |
30 | this.prototype = Error.prototype; | ||
31 | this.name = "RrdTimeError"; | 30 | this.name = "RrdTimeError"; |
32 | this.message = (message) ? message : "Error"; | 31 | this.message = (message) ? message : "Error"; |
33 | }; | 32 | }; |
33 | RrdTimeError.prototype = new Error(); | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * RrdTime | 36 | * RrdTime |