You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by "Max Calderoni (JIRA)" <ji...@apache.org> on 2013/04/02 22:05:14 UTC

[jira] [Closed] (HELIX-75) ZKHelixManager declares throws Exception

     [ https://issues.apache.org/jira/browse/HELIX-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Calderoni closed HELIX-75.
------------------------------

    
> ZKHelixManager declares throws Exception
> ----------------------------------------
>
>                 Key: HELIX-75
>                 URL: https://issues.apache.org/jira/browse/HELIX-75
>             Project: Apache Helix
>          Issue Type: Bug
>          Components: helix-core
>    Affects Versions: 0.6.0-incubating
>            Reporter: Max Calderoni
>            Assignee: kishore gopalakrishna
>            Priority: Minor
>             Fix For: 0.6.1-incubating
>
>         Attachments: helix-75.patch
>
>
> I noticed that in the signature of ZKHelixManager's constructor (and consequently, in HelixManagerFactory.getZKHelixManager()) there is a throws Exception clause.
> Two questions:
> 1. that constructor does not really throw any Exception so that throws clause can be removed.
> 2. even if you wanted to keep that throws clause for some reason, did you really mean to throw 'Exception' or something more specific than that in the API?
> Because that forces client code to catch runtime exceptions, which you normally don't really want to catch, nor want to be forced to carry along 'throws Exception'.
> In general, i noticed in code that there are other parts where things declare 'throws Exception'.
> If that is a choice for the internal code, fine, but again, if it is API, would be best if users were not forced by that practice.
> If all that was meant, could you please explain the arguments for this particular choice of throwing 'Exception'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira