[ https://issues.apache.org/jira/browse/ZOOKEEPER-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710125#action_12710125 ]
Flavio Paiva Junqueira commented on ZOOKEEPER-358: -------------------------------------------------- Thanks, Mahadev. It sounds right that APIs often enough would throw an exception and perhaps this is the behavior a typical java developer would expect. I'm fine either way, and I was just trying to understand if there the reason for throwing an exception in this case is just a matter of taste or if there is something more fundamental behind. I was thinking about perhaps incorporating the patch for this issue into ZOOKEEPER-383. Is this a good idea? > 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.