GitHub user afine opened a pull request:

    https://github.com/apache/zookeeper/pull/240

    ZOOKEEPER-2757: Incorrect path crashes zkCli

    This issue is caused by us relying on `IllegalArgumentException` in 
`PathUtils#validatePath`. `IllegalArgumentException` is an unchecked exception 
and we never catch it within each individual *Command.java, so it bubbles up 
and killed the CLI. 
    
    Given that throwing `IllegalArgumentException` is part of ZooKeeper's API, 
I believe that unfortunately we can not change this behavior at this time. This 
patch catches `IllegalArgumentException` and wraps it, so the CLI prints an 
error but does not quit. I believe I handled all of the relevant commands, 
please check to make sure I am not missing one.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afine/zookeeper ZOOKEEPER-2757

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/240.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #240
    
----
commit 46dce3f1c5c219b72e4e046c0bb42c1201d44238
Author: Abraham Fine <[email protected]>
Date:   2017-04-24T21:47:29Z

    ZOOKEEPER-2757: Incorrect path crashes zkCli

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to