Skip to content

Commit

Permalink
Include full exception when WatchQueueReader thread dies
Browse files Browse the repository at this point in the history
See #2537

Signed-off-by: Cody Cutrer <cody@cutrer.us>
  • Loading branch information
ccutrer committed Nov 1, 2021
1 parent 569dddd commit dded8cf
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ public synchronized void stopWatchService(AbstractWatchService service) {

@Override
public void run() {
try {
for (;;) {
for (;;) {
try {
WatchKey key;
try {
key = watchService.take();
Expand Down Expand Up @@ -272,11 +272,9 @@ public void run() {
}

key.reset();
} catch (Exception exc) {
logger.error("Exception caught in WatchQueueReader: ", exc);
}
} catch (Exception exc) {
logger.debug("ClosedWatchServiceException caught! {}. \n{} Stopping ", exc.getLocalizedMessage(),
Thread.currentThread().getName());
return;
}
}

Expand Down

0 comments on commit dded8cf

Please sign in to comment.