Sha256: 8188bbda622b0e71bdf5404e82344f769b0809b27f2efdf9ccef33e07bd74a6b

Contents?: true

Size: 618 Bytes

Versions: 7

Compression:

Stored size: 618 Bytes

Contents

require 'riak'

module Riak
  # Exception raised when the expected response code from Riak
  # fails to match the actual response code.
  class FailedRequest < StandardError
    include Riak::Util::Translation

    attr_reader :expected
    attr_reader :actual
    attr_reader :output
    attr_reader :message

    def initialize(expected=nil, actual=nil, output=nil, message=nil)
      @expected = expected
      @actual   = actual
      @output   = output
      @message  = message || "failed_request"
      super t(@message, :expected => @expected, :actual => @actual, :output => @output.inspect)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
riakpb-0.1.6 lib/riak/failed_request.rb
riakpb-0.1.5 lib/riak/failed_request.rb
riakpb-0.1.4 lib/riak/failed_request.rb
riakpb-0.1.3 lib/riak/failed_request.rb
riakpb-0.1.2 lib/riak/failed_request.rb
riakpb-0.1.1 lib/riak/failed_request.rb
riakpb-0.1.0 lib/riak/failed_request.rb