From c46212308032e9688b3f4c1335c219937ac6367d Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 20 Jan 2005 00:48:19 +0000 Subject: [PATCH] declare that the native methods throw Win32Exception --- .../java/src/net/hyperic/sigar/win32/Pdh.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/win32/Pdh.java b/bindings/java/src/net/hyperic/sigar/win32/Pdh.java index 7238ecd5..a92584ea 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/Pdh.java +++ b/bindings/java/src/net/hyperic/sigar/win32/Pdh.java @@ -74,15 +74,22 @@ public class Pdh extends Win32Bindings { this.counterPath = cp; } - private static final native long pdhOpenQuery(); - private static final native void pdhCloseQuery(long query); - private static final native long pdhAddCounter(long query, String cp); - private static final native void pdhRemoveCounter(long counter); + private static final native long pdhOpenQuery() throws Win32Exception; + private static final native void pdhCloseQuery(long query) + throws Win32Exception; + private static final native long pdhAddCounter(long query, String cp) + throws Win32Exception; + private static final native void pdhRemoveCounter(long counter) + throws Win32Exception; private static final native double pdhGetSingleValue(long query, - long counter); - private static final native String[] pdhGetInstances(String cp); - private static final native String[] pdhGetKeys(String cp); - private static final native String[] pdhGetObjects(); + long counter) + throws Win32Exception; + private static final native String[] pdhGetInstances(String cp) + throws Win32Exception; + private static final native String[] pdhGetKeys(String cp) + throws Win32Exception; + private static final native String[] pdhGetObjects() + throws Win32Exception; /** * Main method for dumping the entire PDH