catch SigarNotImplementedException

This commit is contained in:
Doug MacEachern 2004-07-28 21:51:37 +00:00
parent 3945733a4b
commit 4ba686e79e
1 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package net.hyperic.sigar.test;
import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.SigarNotImplementedException;
import net.hyperic.sigar.SigarProxy;
import net.hyperic.sigar.Cpu;
@ -29,11 +30,15 @@ public class TestCpu extends SigarTestCase {
traceln("getCpu:");
checkCpu(cpu);
Cpu[] cpuList = sigar.getCpuList();
try {
Cpu[] cpuList = sigar.getCpuList();
for (int i=0; i<cpuList.length; i++) {
traceln("Cpu " + i + ":");
checkCpu(cpuList[i]);
for (int i=0; i<cpuList.length; i++) {
traceln("Cpu " + i + ":");
checkCpu(cpuList[i]);
}
} catch (SigarNotImplementedException e) {
//ok
}
}
}