[folks] Always throw an error in async functions, to avoid breaking (C) API later.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Always throw an error in async functions, to avoid breaking (C) API later.
- Date: Mon, 26 Jul 2010 16:05:53 +0000 (UTC)
commit 1a905f6b5a02c7dc4ec01cc51012a4722ba592bc
Author: Travis Reitter <travis reitter collabora co uk>
Date: Mon Jul 26 17:58:36 2010 +0200
Always throw an error in async functions, to avoid breaking (C) API later.
folks/backend-store.vala | 2 +-
folks/individual-aggregator.vala | 6 +++---
folks/persona-store.vala | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/folks/backend-store.vala b/folks/backend-store.vala
index ad66a3a..f253dfa 100644
--- a/folks/backend-store.vala
+++ b/folks/backend-store.vala
@@ -72,7 +72,7 @@ public class Folks.BackendStore : Object {
* environment variable, if it's set. If it's not set, backends will be
* searched for in a path set at compilation time.
*/
- public async void load_backends () {
+ public async void load_backends () throws GLib.Error {
assert (Module.supported());
var path = Environment.get_variable ("FOLKS_BACKEND_DIR");
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index fead467..1e9ab6e 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -117,7 +117,7 @@ public class Folks.IndividualAggregator : Object
* condition could occur, with the signal being emitted before your code has
* connected to them, and { link Individual}s getting "lost" as a result.
*/
- public async void prepare ()
+ public async void prepare () throws GLib.Error
{
this.backend_store.load_backends ();
}
@@ -315,7 +315,7 @@ public class Folks.IndividualAggregator : Object
*
* @param individual the { link Individual} to remove
*/
- public async void remove_individual (Individual individual)
+ public async void remove_individual (Individual individual) throws GLib.Error
{
foreach (unowned Persona persona in individual.personas)
yield persona.store.remove_persona (persona);
@@ -328,7 +328,7 @@ public class Folks.IndividualAggregator : Object
*
* @param persona the { link Persona} to remove
*/
- public async void remove_persona (Persona persona)
+ public async void remove_persona (Persona persona) throws GLib.Error
{
yield persona.store.remove_persona (persona);
}
diff --git a/folks/persona-store.vala b/folks/persona-store.vala
index 814b7b1..42df206 100644
--- a/folks/persona-store.vala
+++ b/folks/persona-store.vala
@@ -143,5 +143,5 @@ public abstract class Folks.PersonaStore : Object
*
* @param persona the { link Persona} to remove
*/
- public abstract async void remove_persona (Persona persona);
+ public abstract async void remove_persona (Persona persona) throws GLib.Error;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]