libplanet icon indicating copy to clipboard operation
libplanet copied to clipboard

Make `ITransport.SendMessageAsync()` fail more gracefully.

Open greymistcube opened this issue 3 years ago • 2 comments

Currently, the method can throw too many different types of Exceptions, and Exception type is used as elaborate flow control, which is considered an anti-pattern in general. Unless there is a critical failure, callers do not really need to know how ITransport.SendMessageAsync() failed, but are only interested in its return value. It would be better to suppress Exceptions inside ITransport.SendMessageAsync() and return whatever Messages it managed to get as replies. 😶

greymistcube avatar Apr 11 '22 13:04 greymistcube

Also, at the moment, all those Exception types used for flow control isn't even documented in ITransport. 🙄

greymistcube avatar Apr 13 '22 08:04 greymistcube

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 01:07 stale[bot]