You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "TisonKun (Jira)" <ji...@apache.org> on 2019/08/25 02:44:00 UTC

[jira] [Created] (ZOOKEEPER-3520) KeeperException is good to have a error message field besides path

TisonKun created ZOOKEEPER-3520:
-----------------------------------

             Summary: KeeperException is good to have a error message field besides path
                 Key: ZOOKEEPER-3520
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3520
             Project: ZooKeeper
          Issue Type: Bug
          Components: server
            Reporter: TisonKun


We trickily set a diagnosis msg as {{path}} of {{KeeperException}} in {{CreateMode}}(see code snippet below) because {{KeeperException}} doesn't have a dedicated error message field. It is good to have a {{diagnosis}} field beside {{path}} for error message beyond a path.


{code:java}
// CreateMode#L136
String errMsg = "Received an invalid flag value: " + flag + " to convert to a CreateMode";
LOG.error(errMsg);
throw new KeeperException.BadArgumentsException(errMsg);
{code}




--
This message was sent by Atlassian Jira
(v8.3.2#803003)