diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-05-02 22:41:06 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-05-02 22:41:06 +0200 |
commit | 17705656a8bc5a24e5ebc82e0e4894ae2eaeb4ff (patch) | |
tree | e6d5d86642bf204a62c07a81951b1d7e2c0d775d | |
parent | a11c8f0236c190c25bb160f3fe647e56758b7457 (diff) | |
download | gnome-contacts-17705656a8bc5a24e5ebc82e0e4894ae2eaeb4ff.tar.gz |
Silence valac warnings about Error throwing.
-rw-r--r-- | src/contacts-shell-search-provider.vala | 15 | ||||
-rw-r--r-- | src/contacts-utils.vala | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/contacts-shell-search-provider.vala b/src/contacts-shell-search-provider.vala index 1b895a9..b0e86b4 100644 --- a/src/contacts-shell-search-provider.vala +++ b/src/contacts-shell-search-provider.vala @@ -42,15 +42,16 @@ public class Contacts.SearchProvider : Object { this.app.quit (); } - public async string[] GetInitialResultSet (string[] terms) { + public async string[] GetInitialResultSet (string[] terms) throws Error { return yield do_search (terms); } - public async string[] GetSubsearchResultSet (string[] previous_results, string[] new_terms) { + public async string[] GetSubsearchResultSet (string[] previous_results, string[] new_terms) + throws Error { return yield do_search (new_terms); } - private async string[] do_search (string[] terms) { + private async string[] do_search (string[] terms) throws Error { this.app.hold (); // Make the query and search view @@ -72,11 +73,11 @@ public class Contacts.SearchProvider : Object { return results; } - public async HashTable<string, Variant>[] GetResultMetas (string[] ids) { + public async HashTable<string, Variant>[] GetResultMetas (string[] ids) throws Error { return yield get_metas (ids); } - private async HashTable<string, Variant>[] get_metas (owned string[] ids) { + private async HashTable<string, Variant>[] get_metas (owned string[] ids) throws Error { this.app.hold (); var results = new ArrayList<HashTable> (); @@ -117,7 +118,7 @@ public class Contacts.SearchProvider : Object { return results.to_array (); } - public void ActivateResult (string id, string[] terms, uint32 timestamp) { + public void ActivateResult (string id, string[] terms, uint32 timestamp) throws Error { this.app.hold (); try { @@ -128,7 +129,7 @@ public class Contacts.SearchProvider : Object { this.app.release (); } - public void LaunchSearch (string[] terms, uint32 timestamp) { + public void LaunchSearch (string[] terms, uint32 timestamp) throws Error { this.app.hold (); debug ("LaunchSearch (%s)", string.joinv (", ", terms)); diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala index ad24d26..c1a9d74 100644 --- a/src/contacts-utils.vala +++ b/src/contacts-utils.vala @@ -36,7 +36,7 @@ namespace Contacts { [DBus (name = "ActivateAction")] public abstract void ActivateAction (string action, Variant[] parameter, - HashTable<string, Variant> data) throws IOError; + HashTable<string, Variant> data) throws Error; } public void activate_action (string app_id, @@ -62,8 +62,8 @@ namespace Contacts { new GLib.List<File>()); var data = new HashTable<string, Variant>(str_hash, str_equal); data.insert ("desktop-startup-id", new Variant.string (startup_id)); - con.ActivateAction (action, param_array, data); - } catch (IOError e) { + con.ActivateAction (action, param_array, data); + } catch (Error e) { debug ("Failed to activate action" + action); } } |