apearson/insteon-packet-parser

All exceptions should be caught

Closed this issue · 1 comments

All exceptions should be caught, sent as an .on('error'), and the parsing should be reset (throwing away any garbage data)

[→][13.33.B8][S]: Cmd: 0x20 0x12
(node:29) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Parsers_1.Parsers[byte] is not a constructor
(node:29) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This should be fixed by ea806bc

Not throwing an error but handling the junk data