Index: libnautilus-private/nautilus-directory-metafile.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-directory-metafile.c,v
retrieving revision 1.49
diff -u -p -r1.49 nautilus-directory-metafile.c
--- libnautilus-private/nautilus-directory-metafile.c	12 Dec 2005 16:59:10 -0000	1.49
+++ libnautilus-private/nautilus-directory-metafile.c	12 Sep 2006 19:13:06 -0000
@@ -179,8 +179,12 @@ nautilus_directory_is_metadata_read (Nau
 	}
 		
 	result = Nautilus_Metafile_is_read (metafile, &ev);
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		result = TRUE;
+		g_debug ("CORBA exception when determining whether metafile is read: %s",
+			 CORBA_exception_id (&ev));
+	}
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
 	CORBA_exception_free (&ev);
 
 	return result;
@@ -216,7 +220,7 @@ nautilus_directory_get_file_metadata (Na
 	corba_value = Nautilus_Metafile_get (metafile, file_name, key, non_null_default, &ev);
 
 	if (ev._major != CORBA_NO_EXCEPTION) {
-		g_warning ("Failed to get file metadata.");
+		g_debug ("CORBA exception when getting file metadata: %s", CORBA_exception_id (&ev));
 		CORBA_exception_free (&ev);
 		return g_strdup (default_metadata);
 	}
@@ -263,8 +267,12 @@ nautilus_directory_get_file_metadata_lis
 	CORBA_exception_init (&ev);
 	
 	corba_value = Nautilus_Metafile_get_list (metafile, file_name, list_key, list_subkey, &ev);
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("Failed to get metafile list: %s\n", CORBA_exception_id (&ev));
+		CORBA_exception_free (&ev);
+		return NULL;
+	}
 	
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
 	CORBA_exception_free (&ev);
 
 	result = NULL;
@@ -310,7 +318,10 @@ nautilus_directory_set_file_metadata (Na
 
 	Nautilus_Metafile_set (metafile, file_name, key, default_metadata, metadata, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when setting file metadata: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 }
 
@@ -363,7 +374,10 @@ nautilus_directory_set_file_metadata_lis
 
 	Nautilus_Metafile_set_list (metafile, file_name, list_key, list_subkey, corba_list, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when setting file metadata list: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 
 	CORBA_free (corba_list);
@@ -381,15 +395,14 @@ nautilus_directory_get_boolean_file_meta
 	result_as_string = nautilus_directory_get_file_metadata
 		(directory, file_name, key,
 		 default_metadata ? "true" : "false");
+	g_assert (result_as_string != NULL);
 	
 	if (g_ascii_strcasecmp (result_as_string, "true") == 0) {
 		result = TRUE;
 	} else if (g_ascii_strcasecmp (result_as_string, "false") == 0) {
 		result = FALSE;
 	} else {
-		if (result_as_string != NULL) {
-			g_warning ("boolean metadata with value other than true or false");
-		}
+		g_error ("boolean metadata with value other than true or false");
 		result = default_metadata;
 	}
 
@@ -490,7 +503,10 @@ nautilus_directory_copy_file_metadata (N
 	Nautilus_Metafile_copy (metafile, source_file_name,
 				destination_uri, destination_file_name, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when copying file metadata: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 
 	g_free (destination_uri);
@@ -516,7 +532,10 @@ nautilus_directory_remove_file_metadata 
 
 	Nautilus_Metafile_remove (metafile, file_name, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when removing file metadata: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 }
 
@@ -542,7 +561,10 @@ nautilus_directory_rename_file_metadata 
 
 	Nautilus_Metafile_rename (metafile, old_file_name, new_file_name, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when renaming file metadata: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 }
 
@@ -566,7 +588,10 @@ nautilus_directory_rename_directory_meta
 
 	Nautilus_Metafile_rename_directory (metafile, new_directory_uri, &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when renaming directory metadata: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 }
 
@@ -598,7 +623,10 @@ nautilus_directory_register_metadata_mon
 		 BONOBO_OBJREF (directory->details->metafile_monitor),
 		 &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when registering metadata monitor: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 }
 
@@ -624,7 +652,10 @@ nautilus_directory_unregister_metadata_m
 		 BONOBO_OBJREF (directory->details->metafile_monitor),
 		 &ev);
 
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+	if (ev._major != CORBA_NO_EXCEPTION) {
+		g_debug ("CORBA exception when unregistering metadata monitor: %s", CORBA_exception_id (&ev));
+	}
+
 	CORBA_exception_free (&ev);
 
 	bonobo_object_unref (directory->details->metafile_monitor);
Index: libnautilus-private/nautilus-metafile.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-metafile.c,v
retrieving revision 1.44
diff -u -p -r1.44 nautilus-metafile.c
--- libnautilus-private/nautilus-metafile.c	12 Dec 2005 16:59:10 -0000	1.44
+++ libnautilus-private/nautilus-metafile.c	12 Sep 2006 19:13:34 -0000
@@ -749,22 +749,34 @@ corba_rename_directory (PortableServer_S
 }
 
 static GList *
-find_monitor_node (GList *monitors, const Nautilus_MetafileMonitor monitor)
+find_monitor_node (GList *monitors,
+		   const Nautilus_MetafileMonitor monitor,
+		   CORBA_string *error)
 {
 	GList                    *node;
 	CORBA_Environment	  ev;
 	Nautilus_MetafileMonitor  cur_monitor;		
 
+	g_assert (error != NULL);
+	*error = NULL;
+
 	CORBA_exception_init (&ev);
 
 	for (node = monitors; node != NULL; node = node->next) {
 		cur_monitor = node->data;
-		if (CORBA_Object_is_equivalent (cur_monitor, monitor, &ev)) {
+		gboolean equivalent;
+
+		equivalent = CORBA_Object_is_equivalent (cur_monitor, monitor, &ev);
+		if (ev._major != CORBA_NO_EXCEPTION) {
+			node = NULL;
+			*error = CORBA_string_dup (CORBA_exception_id (&ev));
+			break;
+		}
+
+		if (equivalent) {
 			break;
 		}
 	}
-	
-	/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
 
 	CORBA_exception_free (&ev);
 	
@@ -777,10 +789,19 @@ corba_register_monitor (PortableServer_S
 			CORBA_Environment              *ev)
 {
 	NautilusMetafile          *metafile;
+	CORBA_string               error;
+	gboolean                   found;
 	
 	metafile  = NAUTILUS_METAFILE (bonobo_object_from_servant (servant));
 
-	g_return_if_fail (find_monitor_node (metafile->details->monitors, monitor) == NULL);
+	found = find_monitor_node (metafile->details->monitors, monitor, &error) != NULL;
+	g_assert (found || error != NULL);
+
+	if (error != NULL) {
+		g_debug ("CORBA exception when finding monitor node during monitor registration: %s", error);
+		CORBA_free (error);
+		return;
+	}
 
 	metafile->details->monitors = g_list_prepend (metafile->details->monitors,
 						      (gpointer) CORBA_Object_duplicate (monitor, ev));	
@@ -795,12 +816,18 @@ corba_unregister_monitor (PortableServer
 {
 	NautilusMetafile          *metafile;
 	GList                     *node;
+	CORBA_string               error;
 
 	metafile  = NAUTILUS_METAFILE (bonobo_object_from_servant (servant));
 	
-	node = find_monitor_node (metafile->details->monitors, monitor);
+	node = find_monitor_node (metafile->details->monitors, monitor, &error);
+	g_assert (node != NULL || error != NULL);
 
-	g_return_if_fail (node != NULL);
+	if (error != NULL) {
+		g_debug ("CORBA exception when finding monitor node during monitor unregistration: %s", error);
+		CORBA_free (error);
+		return;
+	}
 
 	metafile->details->monitors = g_list_remove_link (metafile->details->monitors, node);
 
@@ -820,7 +847,9 @@ nautilus_metafile_notify_metafile_ready 
 	for (node = metafile->details->monitors; node != NULL; node = node->next) {
 		monitor = node->data;
 		Nautilus_MetafileMonitor_metafile_ready (monitor, &ev);
-		/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+		if (ev._major != CORBA_NO_EXCEPTION) {
+			g_debug ("CORBA exception when notifying about ready metafile: %s", CORBA_exception_id (&ev));
+		}
 	}
 	
 	CORBA_exception_free (&ev);
@@ -839,7 +868,9 @@ call_metafile_changed (NautilusMetafile 
 	for (node = metafile->details->monitors; node != NULL; node = node->next) {
 		monitor = node->data;
 		Nautilus_MetafileMonitor_metafile_changed (monitor, file_names, &ev);
-		/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
+		if (ev._major != CORBA_NO_EXCEPTION) {
+			g_debug ("CORBA exception when notifying about changed metafile: %s", CORBA_exception_id (&ev));
+		}
 	}
 	
 	CORBA_exception_free (&ev);
