Exception: Riakpb::FailedExchange

Inherits:
StandardError
  • Object
show all
Includes:
Util::Translation
Defined in:
lib/riakpb/failed_exchange.rb

Overview

Exception raised when the expected response code from Riakpb fails to match the actual response code.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Translation

#i18n_scope, #t

Constructor Details

#initialize(expected, actual, output, stub) ⇒ FailedExchange

Returns a new instance of FailedExchange.



14
15
16
17
18
19
# File 'lib/riakpb/failed_exchange.rb', line 14

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

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



10
11
12
# File 'lib/riakpb/failed_exchange.rb', line 10

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



9
10
11
# File 'lib/riakpb/failed_exchange.rb', line 9

def expected
  @expected
end

#outputObject (readonly)

Returns the value of attribute output.



11
12
13
# File 'lib/riakpb/failed_exchange.rb', line 11

def output
  @output
end

#stubObject (readonly)

Returns the value of attribute stub.



12
13
14
# File 'lib/riakpb/failed_exchange.rb', line 12

def stub
  @stub
end