[SIGAR-22] Prevent RuntimeException in FileTail impl from killing the FileWatcherThread
This commit is contained in:
parent
1c909233b4
commit
e26be5dc38
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue