[rygel] core: use MediaDBError more consistently
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] core: use MediaDBError more consistently
- Date: Tue, 15 Sep 2009 13:52:37 +0000 (UTC)
commit 0b16c45b5d210ce73c17342da44963a6ca8b9376
Author: Jens Georg <mail jensge org>
Date: Fri Sep 11 20:54:42 2009 +0200
core: use MediaDBError more consistently
src/rygel/rygel-media-db.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-media-db.vala b/src/rygel/rygel-media-db.vala
index 725df3b..4e634fd 100644
--- a/src/rygel/rygel-media-db.vala
+++ b/src/rygel/rygel-media-db.vala
@@ -364,6 +364,7 @@ public class Rygel.MediaDB : Object {
warning ("Failed to prepare delete of object %s: %s",
id,
db.errmsg ());
+ throw new MediaDBError.SQLITE_ERROR (db.errmsg ());
}
}
@@ -650,6 +651,7 @@ public class Rygel.MediaDB : Object {
warning ("Failed to get uris for obj %s: %s",
obj.id,
db.errmsg ());
+ throw new MediaDBError.SQLITE_ERROR (db.errmsg ());
}
}
@@ -675,7 +677,7 @@ public class Rygel.MediaDB : Object {
fill_item (statement, (MediaItem)obj);
break;
default:
- // should not happen
+ assert_not_reached ();
break;
}
@@ -772,6 +774,7 @@ public class Rygel.MediaDB : Object {
warning ("Failed to get children for obj %s: %s",
container_id,
db.errmsg ());
+ throw new MediaDBError.SQLITE_ERROR (db.errmsg ());
}
return children;
@@ -796,6 +799,8 @@ public class Rygel.MediaDB : Object {
warning ("Could not get child count for object %s: %s",
container_id,
db.errmsg ());
+
+ throw new MediaDBError.SQLITE_ERROR (db.errmsg ());
}
return count;
@@ -822,6 +827,8 @@ public class Rygel.MediaDB : Object {
warning ("Could not get child count for object %s: %s",
object_id,
db.errmsg ());
+
+ throw new MediaDBError.SQLITE_ERROR (db.errmsg ());
}
return exists;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]