Widen another catch block (to be defensive)

This commit is contained in:
Dave Syer
2016-10-13 12:39:58 +01:00
parent 5898130751
commit a7019cdd82

View File

@@ -301,8 +301,14 @@ public class FileMonitorConfiguration implements SmartLifecycle, ResourceLoaderA
if (log.isDebugEnabled()) {
log.debug("registering: " + dir + " for file creation events");
}
try {
dir.register(this.watcher, StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_MODIFY);
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw new IOException("Cannot register watcher for " + dir, e);
}
}
}