Exception: Jr::ProtocolMismatch

Inherits:
Error
  • Object
show all
Defined in:
lib/jr.rb

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

#jr

Instance Method Summary collapse

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