Describe the solution you'd like
Currently Error::FrameDecode and Error::InvalidFrameEnd are sibling classes, both inheriting directly from Error. An invalid frame end is semantically a frame decode error, so InvalidFrameEnd should inherit from FrameDecode.
This would simplify rescue clauses in lavinmq, e.g. in client.cr we currently need:
rescue ex : AMQ::Protocol::Error::FrameDecode | AMQ::Protocol::Error::InvalidFrameEnd
With the inheritance change, catching FrameDecode would be sufficient.
Describe the solution you'd like
Currently
Error::FrameDecodeandError::InvalidFrameEndare sibling classes, both inheriting directly from Error. An invalid frame end is semantically a frame decode error, soInvalidFrameEndshould inherit fromFrameDecode.This would simplify rescue clauses in lavinmq, e.g. in client.cr we currently need:
With the inheritance change, catching FrameDecode would be sufficient.