Sha256: 595aa27ec761c4996dc05d55e68757313d38579737a743810f36e394e6275eda

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module Grumlin
  class Error < StandardError; end

  class ConnectionError < Error; end

  class ConnectionStatusError < Error; end

  class NotConnectedError < ConnectionStatusError; end

  class AlreadyConnectedError < ConnectionStatusError; end

  class ProtocolError < Error; end

  class UnknownResponseStatus < ProtocolError
    attr_reader :status

    def initialize(status)
      super("unknown response status code #{status[:code]}")
      @status = status
    end
  end

  class UnknownTypeError < ProtocolError; end

  class ConnectionClosedError < Error; end

  class StatusError < Error
    attr_reader :status

    def initialize(status)
      super(status[:message])
      @status = status
    end
  end

  class ClientSideError < StatusError; end

  class ServerSideError < StatusError; end

  class ScriptEvaluationError < ServerSideError; end

  class InvalidRequestArgumentsError < ServerSideError; end

  class ServerError < ServerSideError; end

  class ServerSerializationError < ServerSideError; end

  class ServerTimeoutError < ServerSideError; end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grumlin-0.1.3 lib/grumlin/exceptions.rb
grumlin-0.1.1 lib/grumlin/exceptions.rb
grumlin-0.1.0 lib/grumlin/exceptions.rb