Exception: Jr::ProtocolMismatch
Overview
ProtocolMismatch is raised when value of ‘rpcjson’ returned by the server does not match JSON_RPC_VERSION. Because of errors in JSON RPC servers, it is NOT raised if ‘rpcjson’ is omitted, even though that is required by the (draft) specification.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(jr, version) ⇒ ProtocolMismatch
constructor
A new instance of ProtocolMismatch.
Constructor Details
#initialize(jr, version) ⇒ ProtocolMismatch
Returns a new instance of ProtocolMismatch.
36 37 38 39 |
# File 'lib/jr.rb', line 36 def initialize(jr, version) super(jr, "We expected to receive a version '#{JSON_RPC_VERSION}' "\ "response, but actually got a #{version.inspect} one.") end |