[SIGAR-22] Prevent RuntimeException in FileTail impl from killing the FileWatcherThread

This commit is contained in:
Doug MacEachern 2006-10-27 20:29:27 +00:00
parent 1c909233b4
commit e26be5dc38
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-10-27 Doug MacEachern <dougm@hyperic.com>
* [SIGAR-22] Prevent RuntimeException in FileTail impl from
killing the FileWatcherThread
2006-10-24 Doug MacEachern <dougm@hyperic.com>
* [SIGAR-20] Fix windows sigar_net_inteface_list to handle > 100

View File

@ -44,7 +44,7 @@ public abstract class FileTail extends FileWatcher {
this.useSudo = useSudo;
}
private void error(String name, Throwable exc) {
static void error(String name, Throwable exc) {
String msg = name + ": " + exc.getMessage();
SigarLog.getLogger(FileTail.class.getName()).error(msg, exc);
}

View File

@ -97,7 +97,11 @@ public class FileWatcherThread implements Runnable {
it.hasNext();)
{
FileWatcher watcher = (FileWatcher)it.next();
watcher.check();
try {
watcher.check();
} catch (Exception e) {
FileTail.error("Unexception exception", e);
}
}
}
}