Author: toshok
Date: 2005-09-23 14:07:41 -0400 (Fri, 23 Sep 2005)
New Revision: 50605
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/StringValidator.cs
Log:
2005-09-23 Chris Toshok <[EMAIL PROTECTED]>
* StringValidator.cs: throw ArgumentException instead of
ConfigurationErrorsException.
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2005-09-23 18:06:44 UTC (rev 50604)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2005-09-23 18:07:41 UTC (rev 50605)
@@ -1,5 +1,10 @@
2005-09-23 Chris Toshok <[EMAIL PROTECTED]>
+ * StringValidator.cs: throw ArgumentException instead of
+ ConfigurationErrorsException.
+
+2005-09-23 Chris Toshok <[EMAIL PROTECTED]>
+
* ConnectionStringsSection.cs: track change to
ConfigurationPropertyOptions.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/StringValidator.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/StringValidator.cs
2005-09-23 18:06:44 UTC (rev 50604)
+++
trunk/mcs/class/System.Configuration/System.Configuration/StringValidator.cs
2005-09-23 18:07:41 UTC (rev 50605)
@@ -65,13 +65,13 @@
{
string s = (string) value;
if (s.Length < minLength)
- throw new ConfigurationErrorsException
("Invalid string length. The minimun length is " + minLength + ".");
+ throw new ArgumentException ("The string must
be at least " + minLength + " characters long.");
if (s.Length > maxLength)
- throw new ConfigurationErrorsException
("Invalid string length. The maximim length is " + maxLength + ".");
+ throw new ArgumentException ("The string must
be no more than " + maxLength + " characters long.");
if (invalidCharacters != null) {
int i = s.IndexOfAny (invalidCharacters);
if (i != -1)
- throw new ConfigurationErrorsException
("The character '" + s[i] + "' is not allowed in this attribute.");
+ throw new ArgumentException
(String.Format ("The string cannot contain any of the following characters:
'{0}'.", invalidCharacters));
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches