[rygel] media-export: Remove warnings from refactoring
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Remove warnings from refactoring
- Date: Sat, 24 Oct 2009 14:09:09 +0000 (UTC)
commit ed414f36a00d3e94559b760ea5188cedd6f3e88f
Author: Jens Georg <mail jensge org>
Date: Wed Sep 30 14:59:58 2009 +0200
media-export: Remove warnings from refactoring
.../media-export/rygel-media-export-harvester.vala | 4 ++--
.../rygel-media-export-root-container.vala | 16 +++++++++-------
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvester.vala b/src/plugins/media-export/rygel-media-export-harvester.vala
index 2d16ba8..77d036d 100644
--- a/src/plugins/media-export/rygel-media-export-harvester.vala
+++ b/src/plugins/media-export/rygel-media-export-harvester.vala
@@ -95,7 +95,7 @@ public class Rygel.MediaExportHarvester : GLib.Object {
this.files.push_tail (new FileQueueEntry (file, false));
return true;
}
- } catch (MediaDBError err) {
+ } catch (DatabaseError err) {
warning ("Failed to query database: %s", err.message);
}
@@ -182,7 +182,7 @@ public class Rygel.MediaExportHarvester : GLib.Object {
foreach (var child in children) {
this.media_db.remove_by_id (child);
}
- } catch (MediaDBError err) {
+ } catch (DatabaseError err) {
warning("Failed to get children of container %s: %s",
container.id,
err.message);
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index c8ede44..bbb6af5 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -32,12 +32,14 @@ internal class Rygel.MediaExportDynamicContainer : Rygel.MediaDBContainer {
public Gee.List<string> get_uris () {
var result = new ArrayList<string> ();
- var children = this.media_db.get_children (this.id, -1, -1);
- if (children != null) {
- foreach (var child in children) {
- result.add_all (child.uris);
+ try {
+ var children = this.media_db.get_children (this.id, -1, -1);
+ if (children != null) {
+ foreach (var child in children) {
+ result.add_all (child.uris);
+ }
}
- }
+ } catch (Error err) {}
return result;
}
@@ -174,7 +176,7 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
ArrayList<string> ids;
try {
ids = media_db.get_child_ids ("0");
- } catch (MediaDBError e) {
+ } catch (DatabaseError e) {
ids = new ArrayList<string>();
}
@@ -197,7 +199,7 @@ public class Rygel.MediaExportRootContainer : Rygel.MediaDBContainer {
id);
try {
this.media_db.remove_by_id (id);
- } catch (MediaDBError e) {
+ } catch (DatabaseError e) {
warning ("Failed to remove entry: %s", e.message);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]