ctubbsii commented on code in PR #3402:
URL: https://github.com/apache/accumulo/pull/3402#discussion_r1196822935
##########
core/src/main/java/org/apache/accumulo/core/lock/ServiceLock.java:
##########
@@ -118,9 +118,9 @@ public ServiceLock(ZooKeeper zookeeper, ServiceLockPath
path, UUID uuid) {
zooKeeper.exists(path.toString(), this);
watchingParent = true;
this.vmLockPrefix = new Prefix(ZLOCK_PREFIX + uuid.toString() + "#");
- } catch (Exception ex) {
+ } catch (KeeperException | InterruptedException ex) {
LOG.error("Error setting initial watch", ex);
- throw new RuntimeException(ex);
+ throw new IllegalStateException(ex);
Review Comment:
Originally committed this, but reverted because this (or another one) broke
the formatter, and my change is more minimal. This might be an improvement, but
not one I'm inclined to bother with here. Maybe it'd be worth putting the
message in a String variable and reusing it, but that's out of scope of my
change, which is just using the more specific type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]