Skip to content

Commit

Permalink
Improve the registry lock failure error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Oct 16, 2020
1 parent f558784 commit 4ae7d3a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private void update(Runnable updater) {
}

private void doUpdate(Runnable updater) {
if (!Files.isReadable(getRegistryFile())) {
if (!Files.isReadable(registryFile)) {
throw new DaemonException("Registry became unaccessible");
}
try {
Expand Down Expand Up @@ -350,7 +350,8 @@ public void busyLockLong(long offset) throws InterruptedException, IllegalStateE
if (currentThread().isInterrupted())
throw new InterruptedException();
else
throw new IllegalStateException("Failed to acquire lock after " + BUSY_LOCK_LIMIT / 1e9 + " seconds.");
throw new IllegalStateException("Failed to lock offset " + offset + " of " + registryFile + " within "
+ BUSY_LOCK_LIMIT / 1e9 + " seconds.");
}

public void unlockLong(long offset) throws IllegalMonitorStateException {
Expand Down

0 comments on commit 4ae7d3a

Please sign in to comment.