Sha256: 4fb6a6eb319a08ba4771b54315371228ac33bd3e05ce29e618587bd7603a9a6c

Contents?: true

Size: 603 Bytes

Versions: 3

Compression:

Stored size: 603 Bytes

Contents

require 'riakpb'

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

    attr_reader :expected
    attr_reader :actual
    attr_reader :output
    attr_reader :stub

    def initialize(expected, actual, output, stub)
      @expected, @actual, @output, @stub = expected, actual, output, stub
      super t("failed_rx", :failure => 
                t(@stub, :expected => @expected, :actual => @actual, :output => @output.inspect)
            )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
riakpb-0.3.0 lib/riakpb/failed_exchange.rb
riakpb-0.2.3 lib/riakpb/failed_exchange.rb
riakpb-0.2.2 lib/riakpb/failed_exchange.rb