blam r612 - in trunk: lib src



Author: atoker
Date: Tue Jun 17 05:49:04 2008
New Revision: 612
URL: http://svn.gnome.org/viewvc/blam?rev=612&view=rev

Log:
Use stderr instead of stdout for warnings

Modified:
   trunk/lib/AtomFeed.cs
   trunk/lib/RSSFeed.cs
   trunk/src/ChannelCollection.cs
   trunk/src/FeedUpdater.cs
   trunk/src/Item.cs
   trunk/src/ItemView.cs
   trunk/src/Opml.cs
   trunk/src/Proxy.cs

Modified: trunk/lib/AtomFeed.cs
==============================================================================
--- trunk/lib/AtomFeed.cs	(original)
+++ trunk/lib/AtomFeed.cs	Tue Jun 17 05:49:04 2008
@@ -28,7 +28,7 @@
                 FileStream fs = new FileStream(file, FileMode.Open);
                 return (AtomFeed)ser.Deserialize(fs);
             } catch(FileNotFoundException){
-                System.Console.WriteLine("Unable to open file");
+                Console.Error.WriteLine("Unable to open file");
                 return null;
             }
         }

Modified: trunk/lib/RSSFeed.cs
==============================================================================
--- trunk/lib/RSSFeed.cs	(original)
+++ trunk/lib/RSSFeed.cs	Tue Jun 17 05:49:04 2008
@@ -196,7 +196,7 @@
 		return (RSS10Feed)ser.Deserialize(fs);
 		}
 		catch(FileNotFoundException){
-			Console.WriteLine("Can't open the flie");
+			Console.Error.WriteLine("Can't open the flie");
 			return null;
 		}
 
@@ -223,7 +223,7 @@
 		return (RSS20Feed)ser.Deserialize(fs);
 		}
 		catch(FileNotFoundException){
-			Console.WriteLine("Can't open the flie");
+			Console.Error.WriteLine("Can't open the flie");
 			return null;
 		}
 

Modified: trunk/src/ChannelCollection.cs
==============================================================================
--- trunk/src/ChannelCollection.cs	(original)
+++ trunk/src/ChannelCollection.cs	Tue Jun 17 05:49:04 2008
@@ -124,7 +124,7 @@
 		    serializer.Serialize (writer, this);
 		    writer.Close();
 		} catch (Exception) {
-		    System.Console.WriteLine ("Failed to save to temporary file");
+		    Console.Error.WriteLine ("Failed to save to temporary file");
 		    return;
 		}
 
@@ -136,7 +136,7 @@
 
 		    File.Move (tmpFile, this.FileName);
 		} catch (Exception e) {
-		    System.Console.WriteLine ("Move failed: " + e.Message);
+		    Console.Error.WriteLine ("Move failed: " + e.Message);
 		    return;
 		}
 		

Modified: trunk/src/FeedUpdater.cs
==============================================================================
--- trunk/src/FeedUpdater.cs	(original)
+++ trunk/src/FeedUpdater.cs	Tue Jun 17 05:49:04 2008
@@ -28,10 +28,10 @@
         {
             bool ignore = Conf.Get(Preference.IGNORE_SSL_ERR, false);
             if(ignore){
-                System.Console.WriteLine("I was asked! allowed!");         
+                Console.Error.WriteLine("I was asked! allowed!");         
                 return true;
             } else {
-                System.Console.WriteLine("not allowing");
+                Console.Error.WriteLine("not allowing");
                 return false;
             }
         }
@@ -78,7 +78,7 @@
             type = "unknown";
         }
         } catch(Exception e){
-                System.Console.WriteLine("Error determining feed type: {0}", e.Message);
+                Console.Error.WriteLine("Error determining feed type: {0}", e.Message);
         }
         
         return type;
@@ -151,7 +151,7 @@
             }
 
         } catch (Exception e) {
-            Console.WriteLine("Error whilst updating the feed {0}: {1}", channel.Name, e.Message);
+            Console.Error.WriteLine("Error whilst updating the feed {0}: {1}", channel.Name, e.Message);
         }
 
         return updated;
@@ -220,27 +220,27 @@
 	            case WebExceptionStatus.ProtocolError:
 		        if (((HttpWebResponse)wE.Response).StatusCode == 
 			    HttpStatusCode.NotModified) {
-		            //Console.WriteLine("No changes to feed.");
+		            //Console.Error.WriteLine("No changes to feed.");
 		        }
 		        if(((HttpWebResponse)wE.Response).StatusCode ==
 		        HttpStatusCode.Unauthorized) {
-		        	System.Console.WriteLine("Unauthorised: " + wE.ToString());
+		        	Console.Error.WriteLine("Unauthorised: " + wE.ToString());
 		        }
 		        break;
 	            case WebExceptionStatus.Timeout:
-		        //Console.WriteLine("Timed out");
-		        //Console.WriteLine("Exception: " + wE.ToString());
+		        //Console.Error.WriteLine("Timed out");
+		        //Console.Error.WriteLine("Exception: " + wE.ToString());
 		        break;
 		        case WebExceptionStatus.TrustFailure:
-		        System.Console.WriteLine("TrustFailure: " + wE.ToString());
+		        Console.Error.WriteLine("TrustFailure: " + wE.ToString());
 		        break;
 	            default:
-		        Console.WriteLine("Exception: " + wE.ToString());
+		        Console.Error.WriteLine("Exception: " + wE.ToString());
 		        break;
 	            }
 	        }
 	    } catch (Exception e) {
-	        Console.WriteLine("Big WebRequest error: {0}", e.Message);
+	        Console.Error.WriteLine("Big WebRequest error: {0}", e.Message);
 	    }
 
 	    return res;
@@ -272,7 +272,7 @@
         try {
             reader = File.OpenText(fs_path);
         } catch(FileNotFoundException e){
-            System.Console.WriteLine("File {0} for URI {1} could not be found: {2}",
+            Console.Error.WriteLine("File {0} for URI {1} could not be found: {2}",
                                       fs_path, channel.Url, e.Message);
             return string.Empty;
         }

Modified: trunk/src/Item.cs
==============================================================================
--- trunk/src/Item.cs	(original)
+++ trunk/src/Item.cs	Tue Jun 17 05:49:04 2008
@@ -84,9 +84,9 @@
 			 * is no content, otherwise use HTML if it's available.
 			 */
 			if (entry.Content == null || entry.Content.Length == 0) {
-                System.Console.WriteLine("no content, title= {0}", this.Title);
+                Console.Error.WriteLine("no content, title= {0}", this.Title);
                 if(entry.Summary.Text == null){
-                    System.Console.WriteLine("summary text null");
+                    Console.Error.WriteLine("summary text null");
                     this.Text = "<p>There was no summary/content found for this entry. This is" + 
                         " most likely a bug.</p>";
                 } else {

Modified: trunk/src/ItemView.cs
==============================================================================
--- trunk/src/ItemView.cs	(original)
+++ trunk/src/ItemView.cs	Tue Jun 17 05:49:04 2008
@@ -63,7 +63,7 @@
             Gnome.Url.Show(args.Request.Uri);
         }
         catch (Exception e) {
-            Console.WriteLine("Couldn't show URL: " + args.Request.Uri + e.Message);
+            Console.Error.WriteLine("Couldn't show URL: " + args.Request.Uri + e.Message);
         }
 
 				args.RetVal = NavigationResponse.Ignore;

Modified: trunk/src/Opml.cs
==============================================================================
--- trunk/src/Opml.cs	(original)
+++ trunk/src/Opml.cs	Tue Jun 17 05:49:04 2008
@@ -262,7 +262,7 @@
 
 	    public void CancelButtonClicked (object obj, EventArgs args)
 	    {
-		System.Console.WriteLine ("Cancel");
+		Console.Error.WriteLine ("Cancel");
 		opmlStatusDialog.Hide ();
 	    }
 

Modified: trunk/src/Proxy.cs
==============================================================================
--- trunk/src/Proxy.cs	(original)
+++ trunk/src/Proxy.cs	Tue Jun 17 05:49:04 2008
@@ -72,7 +72,7 @@
 		    proxyUrlString = "http://"; + host + ":" + port.ToString();
 
 		    proxy = new WebProxy();
-                    //Console.WriteLine("Using proxy " + proxyUrlString);
+                    //Console.Error.WriteLine("Using proxy " + proxyUrlString);
 
                     Uri proxyUrl = new Uri (proxyUrlString);
                     proxy.Address = proxyUrl;
@@ -101,7 +101,7 @@
 	private static void ConfNotifyHandler (object sender,
 					       NotifyEventArgs args)
 	{
-	    Console.WriteLine ("Rereading the proxy settings\n");
+	    Console.Error.WriteLine ("Rereading the proxy settings\n");
 	    RereadProxySettings ();
 	}
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]