Commit db29544931572cb9afab4f829a2548234e190132

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

remove throw

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