Skip to content

Commit

Permalink
fix: don't rethrow JSON.parse errors
Browse files Browse the repository at this point in the history
  • Loading branch information
plasticrake committed Feb 16, 2019
1 parent 212f141 commit 880b9ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/device-networking.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DeviceNetworking extends EventEmitter {
} catch (err) {
logUdpErr('JSON.parse, could not parse:', decryptedMsg);
this.emit('error', err);
throw err;
return;
}
logUdp(msgObj);

Expand All @@ -64,7 +64,7 @@ class DeviceNetworking extends EventEmitter {
} catch (err) {
logUdpErr('JSON.parse, could not parse:', decryptedMsg);
this.emit('error', err);
throw err;
return;
}

let { response, responseForLog } = this.device.processTcpMessage(msgObj);
Expand Down

0 comments on commit 880b9ee

Please sign in to comment.