Commit db29544931572cb9afab4f829a2548234e190132
1 parent
b2e0fde0
Exists in
master
and in
1 other branch
remove throw
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
logsystem/main.js
@@ -17,10 +17,10 @@ | @@ -17,10 +17,10 @@ | ||
17 | 17 | ||
18 | exports.incrementError = function(id, detalhe, inc) { | 18 | exports.incrementError = function(id, detalhe, inc) { |
19 | var bloqueante, errors, errors_log_path; | 19 | var bloqueante, errors, errors_log_path; |
20 | - if (detalhe == null) { | 20 | + if (detalhe === null) { |
21 | detalhe = ""; | 21 | detalhe = ""; |
22 | } | 22 | } |
23 | - if (inc == null) { | 23 | + if (inc === null) { |
24 | inc = 1; | 24 | inc = 1; |
25 | } | 25 | } |
26 | errors_log_path = "./logsystem/errors.log"; | 26 | errors_log_path = "./logsystem/errors.log"; |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | id = "4"; | 40 | id = "4"; |
41 | break; | 41 | break; |
42 | default: | 42 | default: |
43 | - throw new Error("ID inválido"); | 43 | + console.log("ID inválido"); |
44 | } | 44 | } |
45 | if (bloqueante) { | 45 | if (bloqueante) { |
46 | errors["resumo"]["bloqueante"][id] += inc; | 46 | errors["resumo"]["bloqueante"][id] += inc; |
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | 53 | ||
54 | exports.incrementService = function(serviceType, type, inc) { | 54 | exports.incrementService = function(serviceType, type, inc) { |
55 | var services, services_log_path; | 55 | var services, services_log_path; |
56 | - if (inc == null) { | 56 | + if (inc === null) { |
57 | inc = 1; | 57 | inc = 1; |
58 | } | 58 | } |
59 | services_log_path = "./logsystem/services.log"; | 59 | services_log_path = "./logsystem/services.log"; |
@@ -68,10 +68,10 @@ | @@ -68,10 +68,10 @@ | ||
68 | 68 | ||
69 | exports.updateHealth = function(serviceType, value) { | 69 | exports.updateHealth = function(serviceType, value) { |
70 | var services, services_log_path; | 70 | var services, services_log_path; |
71 | - if (serviceType == null) { | 71 | + if (serviceType === null) { |
72 | serviceType = "outros"; | 72 | serviceType = "outros"; |
73 | } | 73 | } |
74 | - if (value == null) { | 74 | + if (value === null) { |
75 | value = 0; | 75 | value = 0; |
76 | } | 76 | } |
77 | services_log_path = "./logsystem/services.log"; | 77 | services_log_path = "./logsystem/services.log"; |