Skip to content

Make InvalidFrameEnd inherit from FrameDecode #35

Description

@kickster97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions