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(""); }