From 1f71614819303c85bc8c0bb59a73d2edea086551 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 18 Sep 2004 17:49:18 +0000 Subject: [PATCH] catch SigarException only --- bindings/dotnet/examples/Df.cs | 2 +- bindings/dotnet/examples/Ifconfig.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/dotnet/examples/Df.cs b/bindings/dotnet/examples/Df.cs index 8860776b..2d4b49fe 100644 --- a/bindings/dotnet/examples/Df.cs +++ b/bindings/dotnet/examples/Df.cs @@ -21,7 +21,7 @@ public class Df { avail = usage.Avail; total = usage.Total; pct = (ulong)(usage.UsePercent * 100); - } catch (ApplicationException) { + } catch (SigarException) { used = avail = total = pct = 0; continue; } diff --git a/bindings/dotnet/examples/Ifconfig.cs b/bindings/dotnet/examples/Ifconfig.cs index 24559b5a..4eed8e1a 100644 --- a/bindings/dotnet/examples/Ifconfig.cs +++ b/bindings/dotnet/examples/Ifconfig.cs @@ -74,7 +74,7 @@ public class Ifconfig { " " + "TX bytes:" + txBytes + " (" + Sigar.FormatSize(txBytes) + ")"); - } catch { } + } catch (SigarException) { } println(""); }