Author: siwuzzz
Date: Mon May 14 20:22:30 2007
New Revision: 149

Modified:
   trunk/clients/cs/src/core/exceptions.cs

Log:
exceptions.cs:
Changed GDataRequestException.ReadResponseString() to correct a 
NullReferenceException where webResponse would be null.

Modified: trunk/clients/cs/src/core/exceptions.cs
==============================================================================
--- trunk/clients/cs/src/core/exceptions.cs     (original)
+++ trunk/clients/cs/src/core/exceptions.cs     Mon May 14 20:22:30 2007
@@ -233,15 +233,16 @@
         /// <returns>the error message</returns>
         protected string    ReadResponseString()
         {
+            if (this.webResponse == null)
+                return (null);
+
             Stream responseStream = this.webResponse.GetResponseStream();
             
-            if (responseStream != null)
-            {
-                StreamReader reader = new StreamReader(responseStream);
-                return (reader.ReadToEnd());
-            }
+            if (responseStream == null)
+                return (null);
 
-            return (null);
+            StreamReader reader = new StreamReader(responseStream);
+            return (reader.ReadToEnd());
         }
 
         /// <summary>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to