[rygel/rygel-0-40] tracker3: Do not error out if service is missing
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-40] tracker3: Do not error out if service is missing
- Date: Tue, 10 May 2022 18:34:08 +0000 (UTC)
commit 588fe978c069ecaa8e253ab4cd44aca8a897e813
Author: Jens Georg <mail jensge org>
Date: Sun May 8 19:59:19 2022 +0200
tracker3: Do not error out if service is missing
Fixes #196
src/plugins/tracker3/rygel-tracker-plugin-factory.vala | 2 +-
src/plugins/tracker3/rygel-tracker-plugin.vala | 2 +-
src/plugins/tracker3/rygel-tracker-root-container.vala | 8 ++------
3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
b/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
index 06f8149bb..2e775af82 100644
--- a/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
+++ b/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
@@ -40,7 +40,7 @@ public void module_init (PluginLoader loader) {
public class Rygel.Tracker.PluginFactory {
PluginLoader loader;
- public PluginFactory (PluginLoader loader) throws IOError, DBusError {
+ public PluginFactory (PluginLoader loader) throws Error {
this.loader = loader;
this.loader.add_plugin (new Tracker.Plugin ());
diff --git a/src/plugins/tracker3/rygel-tracker-plugin.vala b/src/plugins/tracker3/rygel-tracker-plugin.vala
index 6333f2082..941ee2288 100644
--- a/src/plugins/tracker3/rygel-tracker-plugin.vala
+++ b/src/plugins/tracker3/rygel-tracker-plugin.vala
@@ -28,7 +28,7 @@ public class Rygel.Tracker.Plugin : Rygel.MediaServerPlugin {
private static RootContainer root;
- public Plugin () {
+ public Plugin () throws Error {
if (root == null) {
// translators: @REALNAME@ is substituted for user's real name and it doesn't need translation.
root = new RootContainer (_("@REALNAME@’s media"));
diff --git a/src/plugins/tracker3/rygel-tracker-root-container.vala
b/src/plugins/tracker3/rygel-tracker-root-container.vala
index c7f722a81..fc25eac16 100644
--- a/src/plugins/tracker3/rygel-tracker-root-container.vala
+++ b/src/plugins/tracker3/rygel-tracker-root-container.vala
@@ -34,13 +34,9 @@ public class Rygel.Tracker.RootContainer : Rygel.SimpleContainer {
public static Sparql.Connection connection;
- public RootContainer (string title) {
+ public RootContainer (string title) throws Error {
if (RootContainer.connection == null) {
- try {
- RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
- } catch (Error err) {
- error ("Failed to connect to tracker: %s", err.message);
- }
+ RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
}
base.root (title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]