Commit b2b00c25b6aba45134a5d239068882cce5c2abad

Authored by Cassio Cabral
1 parent db295449
Exists in master and in 1 other branch devel

change thrown on coffee

Showing 2 changed files with 6 additions and 6 deletions   Show diff stats
logsystem/main.coffee
@@ -36,7 +36,7 @@ exports.incrementError = (id, detalhe="", inc=1) -> @@ -36,7 +36,7 @@ exports.incrementError = (id, detalhe="", inc=1) ->
36 when 'legenda' then id = "3" 36 when 'legenda' then id = "3"
37 when 'endpoint' then id = "4" 37 when 'endpoint' then id = "4"
38 else 38 else
39 - throw new Error "ID inválido" 39 + console.log("ID inválido")
40 40
41 if bloqueante 41 if bloqueante
42 errors["resumo"]["bloqueante"][id] += inc 42 errors["resumo"]["bloqueante"][id] += inc
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";
@@ -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";