Exception: Riakpb::FailedExchange
- Inherits:
-
StandardError
- Object
- StandardError
- Riakpb::FailedExchange
- 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
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#stub ⇒ Object
readonly
Returns the value of attribute stub.
Instance Method Summary collapse
-
#initialize(expected, actual, output, stub) ⇒ FailedExchange
constructor
A new instance of FailedExchange.
Methods included from Util::Translation
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
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
10 11 12 |
# File 'lib/riakpb/failed_exchange.rb', line 10 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
9 10 11 |
# File 'lib/riakpb/failed_exchange.rb', line 9 def expected @expected end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
11 12 13 |
# File 'lib/riakpb/failed_exchange.rb', line 11 def output @output end |
#stub ⇒ Object (readonly)
Returns the value of attribute stub.
12 13 14 |
# File 'lib/riakpb/failed_exchange.rb', line 12 def stub @stub end |