Mahadev konar commented on ZOOKEEPER-358:

  We should still throw an exception with the openledger call. The  
asynchronous api is no excuse to hide excpetions. THe idea is to have 
asycnrhonous calls return the same error codes as the exception that you throw. 
For an example, take a look at zookeeper client api in java. It has both the 
synchronous calls and aysnc calls. The sync calls throw an exception and the 
async calls call the callback function with a return code which maps to the 
exception thrown via sync calls.

> Throw exception when ledger does not exist
> ------------------------------------------
>                 Key: ZOOKEEPER-358
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-358
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Luca Telloli
>            Assignee: Flavio Paiva Junqueira
>            Priority: Minor
>         Attachments: ZOOKEEPER-358.patch
> Currently, openLedger() in the BookKeeper client returns null if the ledger 
> ID does not exist on ZK. Maybe it would be better to throw a specific 
> exception so it can be handled by the client side. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to