Exception: Riakpb::FailedRequest
- Inherits:
-
StandardError
- Object
- StandardError
- Riakpb::FailedRequest
- Includes:
- Util::Translation
- Defined in:
- lib/riakpb/failed_request.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.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(expected = nil, actual = nil, output = nil, message = nil) ⇒ FailedRequest
constructor
A new instance of FailedRequest.
Methods included from Util::Translation
Constructor Details
#initialize(expected = nil, actual = nil, output = nil, message = nil) ⇒ FailedRequest
Returns a new instance of FailedRequest.
14 15 16 17 18 19 20 |
# File 'lib/riakpb/failed_request.rb', line 14 def initialize(expected=nil, actual=nil, output=nil, =nil) @expected = expected @actual = actual @output = output @message = || "failed_request" super t(@message, :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_request.rb', line 10 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
9 10 11 |
# File 'lib/riakpb/failed_request.rb', line 9 def expected @expected end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
12 13 14 |
# File 'lib/riakpb/failed_request.rb', line 12 def @message end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
11 12 13 |
# File 'lib/riakpb/failed_request.rb', line 11 def output @output end |