[tracker/initable-db-iface] libtracker-direct: Avoid warning in case of no permission to meta.db
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/initable-db-iface] libtracker-direct: Avoid warning in case of no permission to meta.db
- Date: Thu, 3 Feb 2011 10:14:32 +0000 (UTC)
commit 7e86671277bc8070e0f4715f319eecb5eb4997ee
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Feb 3 11:13:11 2011 +0100
libtracker-direct: Avoid warning in case of no permission to meta.db
The warning is unneeded as the fallback to libtracker-bus will deal
with it. Throw the error as Sparql.Error.INTERNAL instead.
src/libtracker-direct/tracker-direct.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-direct/tracker-direct.vala b/src/libtracker-direct/tracker-direct.vala
index 4551e45..a58b1a9 100644
--- a/src/libtracker-direct/tracker-direct.vala
+++ b/src/libtracker-direct/tracker-direct.vala
@@ -30,7 +30,11 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
select_cache_size = env_cache_size.to_int();
}
- if (!Data.Manager.init (DBManagerFlags.READONLY, null, null, false, select_cache_size, 0, null, null)) {
+ try {
+ if (!Data.Manager.init (DBManagerFlags.READONLY, null, null, false, select_cache_size, 0, null, null)) {
+ throw new Sparql.Error.INTERNAL ("Unable to initialize database");
+ }
+ } catch (Tracker.DBInterfaceError e) {
throw new Sparql.Error.INTERNAL ("Unable to initialize database");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]