sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Change `EventDispatcher.shutdownWithProtocolError` to throw, not return #293

Closed gavin-norman-sociomantic closed 6 years ago

gavin-norman-sociomantic commented 6 years ago

The returned exception is intended to always be thrown, and it would be a bug, really, if the caller did not do so. Therefore, making the method throw directly simplifies usage and removes one vector for bugs.