jnan77 / jsonrpc4j

Automatically exported from code.google.com/p/jsonrpc4j
0 stars 0 forks source link

Errors support for JSON-RPC Client needed #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Class JsonRpcHttpClient has method
public Object invoke(String methodName, Object argument, Type returnType)
On error this method sthrows an Throwable object

Some Json-rpc servers uses not only standart error codes (-32600, -32601, 
-32601, -32603, -32700), but implement its own error codes.
For example Bitcoind (most widly used server to manage Bitcoins) uses about 20 
custom error codes 
(https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.h)

To work with such JSON-RPC services we need to know error code if error 
happened. So method invoke(...) should throw some custom object that is child 
of Throwable or Exception and has getErrorCode() method.

Original issue reported on code.google.com by mezr...@gmail.com on 29 Aug 2013 at 5:28

GoogleCodeExporter commented 8 years ago
I found the ExceptionResolver feature. Sorry

Original comment by mezr...@gmail.com on 29 Aug 2013 at 5:57

GoogleCodeExporter commented 8 years ago

Original comment by brian.di...@gmail.com on 18 Oct 2013 at 11:13