From 08cb512ad132e31f8b43304a3c4e554fb9722dc5 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 15 Mar 2005 18:45:44 +0000 Subject: [PATCH] throw NfsUnreachableException from getMountedFileSystemUsage --- bindings/java/src/net/hyperic/sigar/Sigar.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index cd8a9012..9e3c89b3 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -532,12 +532,12 @@ public class Sigar implements SigarProxy { * before attempting to get the file system stats to prevent application * hang when an NFS server is down. * @param name Name of the directory on which filesystem is mounted. - * @exception SigarException If given directory is not mounted - * or NFS server is unreachable. + * @exception SigarException If given directory is not mounted. + * @exception NfsUnreachableException If NFS server is unreachable. * @see net.hyperic.sigar.Sigar#getFileSystemUsage */ public FileSystemUsage getMountedFileSystemUsage(String name) - throws SigarException { + throws SigarException, NfsUnreachableException { FileSystem fs = getFileSystemMap().getMountPoint(name); @@ -548,8 +548,7 @@ public class Sigar implements SigarProxy { if (fs instanceof NfsFileSystem) { NfsFileSystem nfs = (NfsFileSystem)fs; if (!nfs.ping()) { - throw new SigarException(nfs.getHostname() + ":" + name + - " nfs server unreachable"); + throw nfs.getUnreachableException(); } }