CheeseLord / warts

WAcky Real Time Strategy
MIT License
1 stars 0 forks source link

Various crashes when handling invalid messages #19

Closed kronmillerg closed 7 years ago

kronmillerg commented 7 years ago

For certain specific types of failures when parsing messages, we raise InvalidMessageError, which is (AFAIK) handled reasonably by message handlers. However, when any other sort of exception is thrown (for example, we try to parse an int but got "steve"), it just propagates its way up without ever being handled, causing that component to crash.

Proposed solution: at the top-level message parser, catch all non-InvalidMessageError exceptions and convert them to InvalidMessageError.

kronmillerg commented 7 years ago

Reintroduced by 3b8125d, which reverted the fix.

kronmillerg commented 7 years ago

We really need to add a regression test this time.