Closed nikcub closed 9 years ago
parse JSON-RPC error object into code and message and provide string and object casting.
code
message
example:
try: block_hashes = rpc_connection.batch_(commands) blocks = rpc_connection.batch_([ [ "getblocks", h ] for h in block_hashes ]) block_times = [ block["time"] for block in blocks ] print(block_times) except JSONRPCException, e: print "Error: %s" % e print e.code print e.message
backwards compatible.
parse JSON-RPC error object into
code
andmessage
and provide string and object casting.example:
backwards compatible.