diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-01-10 09:23:14 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2009-01-10 09:23:14 -0800 |
commit | de87f812ff52c78e0738a56db1a8b1879ab63b44 (patch) | |
tree | 6f8caf24ba17974ae8ea5b4a7713956c26bb339a | |
parent | abafbb88e5b08ff00805d868a14b4e9c5a106d6f (diff) | |
download | DotNetOpenAuth-de87f812ff52c78e0738a56db1a8b1879ab63b44.zip DotNetOpenAuth-de87f812ff52c78e0738a56db1a8b1879ab63b44.tar.gz DotNetOpenAuth-de87f812ff52c78e0738a56db1a8b1879ab63b44.tar.bz2 |
Made MessagingUtilities.CreateQueryString exception more useful.
-rw-r--r-- | src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs | 11 | ||||
-rw-r--r-- | src/DotNetOpenAuth/Messaging/MessagingStrings.resx | 5 | ||||
-rw-r--r-- | src/DotNetOpenAuth/Messaging/MessagingUtilities.cs | 4 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs b/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs index dcddff8..1aa3cc2 100644 --- a/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs +++ b/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs @@ -475,7 +475,16 @@ namespace DotNetOpenAuth.Messaging { } /// <summary> - /// Looks up a localized string similar to A null value was included and is not allowed.. + /// Looks up a localized string similar to A null key was included and is not allowed.. + /// </summary> + internal static string UnexpectedNullKey { + get { + return ResourceManager.GetString("UnexpectedNullKey", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to A null value was included for key '{0}' and is not allowed.. /// </summary> internal static string UnexpectedNullValue { get { diff --git a/src/DotNetOpenAuth/Messaging/MessagingStrings.resx b/src/DotNetOpenAuth/Messaging/MessagingStrings.resx index e11f874..f1fc03a 100644 --- a/src/DotNetOpenAuth/Messaging/MessagingStrings.resx +++ b/src/DotNetOpenAuth/Messaging/MessagingStrings.resx @@ -255,8 +255,11 @@ <data name="UnexpectedMessageReceivedOfMany" xml:space="preserve"> <value>Unexpected message type received.</value> </data> + <data name="UnexpectedNullKey" xml:space="preserve"> + <value>A null key was included and is not allowed.</value> + </data> <data name="UnexpectedNullValue" xml:space="preserve"> - <value>A null value was included and is not allowed.</value> + <value>A null value was included for key '{0}' and is not allowed.</value> </data> <data name="UnexpectedType" xml:space="preserve"> <value>The type {0} or a derived type was expected, but {1} was given.</value> diff --git a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs index 25f3d77..5086caf 100644 --- a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs @@ -357,8 +357,8 @@ namespace DotNetOpenAuth.Messaging { StringBuilder sb = new StringBuilder(args.Count() * 10); foreach (var p in args) { - ErrorUtilities.VerifyArgument(p.Key != null, MessagingStrings.UnexpectedNullValue); - ErrorUtilities.VerifyArgument(p.Value != null, MessagingStrings.UnexpectedNullValue); + ErrorUtilities.VerifyArgument(p.Key != null, MessagingStrings.UnexpectedNullKey); + ErrorUtilities.VerifyArgument(p.Value != null, MessagingStrings.UnexpectedNullValue, p.Key); sb.Append(HttpUtility.UrlEncode(p.Key)); sb.Append('='); sb.Append(HttpUtility.UrlEncode(p.Value)); |