Sha256: 1f420f35220e31f11e49458ee55321d65f48217ecaa01e4110f745dcd1f58873

Contents?: true

Size: 1.07 KB

Versions: 36

Compression:

Stored size: 1.07 KB

Contents

class Redis
  # Base error for all redis-rb errors.
  class BaseError < RuntimeError
  end

  # Raised by the connection when a protocol error occurs.
  class ProtocolError < BaseError
    def initialize(reply_type)
      super(<<-EOS.gsub(/(?:^|\n)\s*/, " "))
        Got '#{reply_type}' as initial reply byte.
        If you're in a forking environment, such as Unicorn, you need to
        connect to Redis after forking.
      EOS
    end
  end

  # Raised by the client when command execution returns an error reply.
  class CommandError < BaseError
  end

  # Base error for connection related errors.
  class BaseConnectionError < BaseError
  end

  # Raised when connection to a Redis server cannot be made.
  class CannotConnectError < BaseConnectionError
  end

  # Raised when connection to a Redis server is lost.
  class ConnectionError < BaseConnectionError
  end

  # Raised when performing I/O times out.
  class TimeoutError < BaseConnectionError
  end

  # Raised when the connection was inherited by a child process.
  class InheritedError < BaseConnectionError
  end
end

Version data entries

36 entries across 35 versions & 9 rubygems

Version Path
redis-3.2.1 lib/redis/errors.rb
redis-3.2.0 lib/redis/errors.rb
redis-3.1.0 lib/redis/errors.rb
redis-3.0.7 lib/redis/errors.rb
redis-3.0.6 lib/redis/errors.rb
redis-3.0.5 lib/redis/errors.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/redis-3.0.4/lib/redis/errors.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/redis-3.0.4/lib/redis/errors.rb
redis-3.0.4 lib/redis/errors.rb
redis-3.0.3 lib/redis/errors.rb
remq-0.0.4 vendor/bundle/gems/redis-3.0.2/lib/redis/errors.rb
remq-0.0.3 vendor/bundle/gems/redis-3.0.2/lib/redis/errors.rb
redis-3.0.2 lib/redis/errors.rb
redis-3.0.1 lib/redis/errors.rb
redis-3.0.0 lib/redis/errors.rb
redis-3.0.0.rc2 lib/redis/errors.rb