Sha256: 91be798424267a286712a8fb981ded4d903db1b0d5b4cc5c17bccb43179b1fb5

Contents?: true

Size: 911 Bytes

Versions: 1

Compression:

Stored size: 911 Bytes

Contents

module AMQP
  class Client
    class Error < StandardError; end

    # Raised when a frame that wasn't expected arrives
    class UnexpectedFrame < Error
      def initialize(expected, actual)
        super "Expected frame type '#{expected}' but got '#{actual}'"
      end
    end

    # Raised when a frame doesn't end with 206
    class UnexpectedFrameEnd < Error
      def initialize(actual)
        super "Expected frame end 206 but got '#{actual}'"
      end
    end

    class UnsupportedFrameType < Error
      def initialize(type)
        super "Unsupported frame type '#{type}'"
      end
    end

    class UnsupportedMethodFrame < Error
      def initialize(class_id, method_id)
        super "Unsupported class/method: #{class_id} #{method_id}"
      end
    end

    class ChannelClosedError < Error
      def initialize(id)
        super "Channel #{id} already closed"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amqp-client-0.1.0 lib/amqp/client/errors.rb