Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Maurer <benm@mono-cvs.ximian.com>2004-03-23 23:57:13 +0300
committerBen Maurer <benm@mono-cvs.ximian.com>2004-03-23 23:57:13 +0300
commita68914c64588c93f27567f7306c221f1e8e2ca49 (patch)
treee10adb49651280deffd1af183dc44a3d2aa51679 /mcs/class/System/System.Diagnostics
parentfe7f4283068c109b83dec308158d9483997e2c13 (diff)
2004-03-23 Ben Maurer <bmaurer@users.sourceforge.net>
* Switch.cs: Don't throw when there is no switches section. svn path=/trunk/mcs/; revision=24502
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
-rw-r--r--mcs/class/System/System.Diagnostics/ChangeLog4
-rwxr-xr-xmcs/class/System/System.Diagnostics/Switch.cs19
2 files changed, 12 insertions, 11 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog
index 276c8d47e18..b6d3157b7ab 100644
--- a/mcs/class/System/System.Diagnostics/ChangeLog
+++ b/mcs/class/System/System.Diagnostics/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-23 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * Switch.cs: Don't throw when there is no switches section.
+
2004-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Process.cs: support EnableRaisingEvents + Exited event.
diff --git a/mcs/class/System/System.Diagnostics/Switch.cs b/mcs/class/System/System.Diagnostics/Switch.cs
index d154668710a..c278fc48686 100755
--- a/mcs/class/System/System.Diagnostics/Switch.cs
+++ b/mcs/class/System/System.Diagnostics/Switch.cs
@@ -70,17 +70,14 @@ namespace System.Diagnostics
private void GetConfigFileSetting ()
{
- // Load up the specified switch
- IDictionary d =
- (IDictionary) DiagnosticsConfiguration.Settings ["switches"];
- if (d != null) {
- object o = d [name];
- try {
- switchSetting = int.Parse (o.ToString());
- }
- catch {
- switchSetting = 0;
- }
+ try {
+
+ // Load up the specified switch
+ IDictionary d = (IDictionary) DiagnosticsConfiguration.Settings ["switches"];
+ if (d != null)
+ switchSetting = int.Parse (d [name].ToString());
+ } catch {
+ switchSetting = 0;
}
}