------------------------------------------------------------
revno: 109
committer: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
branch nick: edit-fixes
timestamp: Thu 2010-03-18 10:13:37 +1100
message:
  Catch exceptions in creating the URI list
modified:
  src/Util.cs
diff:
=== modified file 'src/Util.cs'
--- a/src/Util.cs	2009-08-10 17:42:29 +0000
+++ b/src/Util.cs	2010-03-17 23:13:37 +0000
@@ -84,12 +84,16 @@
 		{
 			Uri uri;
 			
-			if (File.Exists (unknown) || Directory.Exists (unknown))
-				uri = UriUtils.PathToFileUri (unknown);
-			else 
-				uri = new Uri (unknown);
-			
-			Add (uri);
+			try {
+				if (File.Exists (unknown) || Directory.Exists (unknown))
+					uri = UriUtils.PathToFileUri (unknown);
+				else
+					uri = new Uri (unknown);
+				
+				Add (uri);
+			} catch (Exception e) {
+				Log.Exception ("Error handling file or directory to view", e);
+			}
 		}
 	
 		public UriList (string data)
