Author: kostat
Date: 2007-12-25 02:12:08 -0500 (Tue, 25 Dec 2007)
New Revision: 91871

Modified:
   trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
   
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
Log:
typo - pass the correct property to Attribute.GetCustomAttribute; Pass oroginal 
exception as inner

Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2007-12-25 05:01:57 UTC (rev 91870)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2007-12-25 07:12:08 UTC (rev 91871)
@@ -1,3 +1,9 @@
+2007-12-25  Konstantin Triger <[EMAIL PROTECTED]>
+
+       * ConfigurationElement.cs:
+               1. typo - pass the correct property to 
Attribute.GetCustomAttribute.
+               2. Pass oroginal exception as inner.
+
 2007-12-05  Marek Habersack  <[EMAIL PROTECTED]>
 
        * ConfigurationElement.cs: some property values may be null

Modified: 
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
===================================================================
--- 
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
   2007-12-25 05:01:57 UTC (rev 91870)
+++ 
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
   2007-12-25 07:12:08 UTC (rev 91871)
@@ -322,7 +322,7 @@
                                        throw;
                                } catch (Exception ex) {
                                        string msg = String.Format ("The value 
of the property '{0}' cannot be parsed.", prop.Name);
-                                       throw new ConfigurationErrorsException 
(msg, reader);
+                                       throw new ConfigurationErrorsException 
(msg, ex, reader);
                                }
                                readProps [prop] = prop.Name;
                        }
@@ -608,10 +608,10 @@
                                if (at == null) continue;
                                string name = at.Name != null ? at.Name : 
prop.Name;
 
-                               ConfigurationValidatorAttribute validatorAttr = 
Attribute.GetCustomAttribute (t, typeof(ConfigurationValidatorAttribute)) as 
ConfigurationValidatorAttribute;
+                               ConfigurationValidatorAttribute validatorAttr = 
Attribute.GetCustomAttribute (prop, typeof (ConfigurationValidatorAttribute)) 
as ConfigurationValidatorAttribute;
                                ConfigurationValidatorBase validator = 
validatorAttr != null ? validatorAttr.ValidatorInstance : null;
 
-                               TypeConverterAttribute convertAttr = 
(TypeConverterAttribute) Attribute.GetCustomAttribute (t, typeof 
(TypeConverterAttribute));
+                               TypeConverterAttribute convertAttr = 
(TypeConverterAttribute) Attribute.GetCustomAttribute (prop, typeof 
(TypeConverterAttribute));
                                TypeConverter converter = convertAttr != null ? 
(TypeConverter) Activator.CreateInstance (Type.GetType 
(convertAttr.ConverterTypeName)) : null;
                                ConfigurationProperty cp = new 
ConfigurationProperty (name, prop.PropertyType, at.DefaultValue, converter, 
validator, at.Options);
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to