declare SigarNotImplementedException

This commit is contained in:
Doug MacEachern committed 2005-05-10 21:29:29 +00:00
1 parent 58318b381d
commit 2c7f23f793
2 files changed
+7 -3

No files matched your search

@@ -183,7 +183,7 @@ public class SigarInvoker {
}
public Object invoke(Object arg, String attr)
throws SigarException {
throws SigarException, SigarNotImplementedException {
Object[] args = null;
@@ -200,7 +200,7 @@ public class SigarInvoker {
}
public Object invoke(Object[] args, String attr)
throws SigarException {
throws SigarException, SigarNotImplementedException {
Method typeGetter, attrGetter;
Object typeObject, attrObject;
@@ -219,6 +219,9 @@ public class SigarInvoker {
String msg = "Failed to invoke " +
typeGetter.getName() + parms +
": " + t.getMessage();
if (t instanceof SigarNotImplementedException) {
throw (SigarNotImplementedException)t;
}
throw new SigarException(msg);
}
@@ -5,6 +5,7 @@ import java.util.StringTokenizer;
import net.hyperic.sigar.SigarException;
import net.hyperic.sigar.SigarInvoker;
import net.hyperic.sigar.SigarNotImplementedException;
import net.hyperic.sigar.SigarProxy;
import net.hyperic.sigar.util.ReferenceMap;
@@ -171,7 +172,7 @@ public class SigarInvokerJMX extends SigarInvoker {
* @exception SigarException If invocation fails.
*/
public Object invoke(String attr)
throws SigarException {
throws SigarException, SigarNotImplementedException {
return super.invoke(getArg(), attr);
}