[tracker] libtracker-sparql: ALL APIs can now throw GLib.Error
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-sparql: ALL APIs can now throw GLib.Error
- Date: Thu, 4 Sep 2014 09:28:23 +0000 (UTC)
commit 02bdcedf519a1fb50d56263113bf548ad8d71934
Author: Martyn Russell <martyn lanedo com>
Date: Thu Sep 4 10:26:20 2014 +0100
libtracker-sparql: ALL APIs can now throw GLib.Error
This fixes a warning about not catching a potential GLib.Error being thrown
for the GUnixFDList's _append() API.
src/libtracker-bus/tracker-bus.vala | 18 +++++++++---------
src/libtracker-sparql/tracker-connection.vala | 14 +++++++-------
2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index 2f1bf14..9e6f0dd 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -50,7 +50,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
}
}
- void send_query (string sparql, UnixOutputStream output, Cancellable? cancellable,
AsyncReadyCallback? callback) throws GLib.IOError {
+ void send_query (string sparql, UnixOutputStream output, Cancellable? cancellable,
AsyncReadyCallback? callback) throws GLib.IOError, GLib.Error {
var message = new DBusMessage.method_call (Tracker.DBUS_SERVICE,
Tracker.DBUS_OBJECT_STEROIDS, Tracker.DBUS_INTERFACE_STEROIDS, "Query");
var fd_list = new UnixFDList ();
message.set_body (new Variant ("(sh)", sparql, fd_list.append (output.fd)));
@@ -59,7 +59,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
bus.send_message_with_reply.begin (message, DBusSendMessageFlags.NONE, int.MAX, null,
cancellable, callback);
}
- public override Sparql.Cursor query (string sparql, Cancellable? cancellable) throws Sparql.Error,
IOError, DBusError {
+ public override Sparql.Cursor query (string sparql, Cancellable? cancellable) throws Sparql.Error,
GLib.Error, GLib.IOError, DBusError {
// use separate main context for sync operation
var context = new MainContext ();
var loop = new MainLoop (context, false);
@@ -74,7 +74,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
return query_async.end (async_res);
}
- public async override Sparql.Cursor query_async (string sparql, Cancellable? cancellable = null)
throws Sparql.Error, IOError, DBusError {
+ public async override Sparql.Cursor query_async (string sparql, Cancellable? cancellable = null)
throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
UnixInputStream input;
UnixOutputStream output;
pipe (out input, out output);
@@ -109,7 +109,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
return new FDCursor (mem_stream.steal_data (), mem_stream.data_size, variable_names);
}
- void send_update (string method, UnixInputStream input, Cancellable? cancellable, AsyncReadyCallback?
callback) throws GLib.IOError {
+ void send_update (string method, UnixInputStream input, Cancellable? cancellable, AsyncReadyCallback?
callback) throws GLib.Error, GLib.IOError {
var message = new DBusMessage.method_call (Tracker.DBUS_SERVICE,
Tracker.DBUS_OBJECT_STEROIDS, Tracker.DBUS_INTERFACE_STEROIDS, method);
var fd_list = new UnixFDList ();
message.set_body (new Variant ("(h)", fd_list.append (input.fd)));
@@ -118,7 +118,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
bus.send_message_with_reply.begin (message, DBusSendMessageFlags.NONE, int.MAX, null,
cancellable, callback);
}
- public override void update (string sparql, int priority = GLib.Priority.DEFAULT, Cancellable?
cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public override void update (string sparql, int priority = GLib.Priority.DEFAULT, Cancellable?
cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
// use separate main context for sync operation
var context = new MainContext ();
var loop = new MainLoop (context, false);
@@ -133,7 +133,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
update_async.end (async_res);
}
- public async override void update_async (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async override void update_async (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
UnixInputStream input;
UnixOutputStream output;
pipe (out input, out output);
@@ -165,7 +165,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
handle_error_reply (reply);
}
- public async override GenericArray<Error?>? update_array_async (string[] sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async override GenericArray<Error?>? update_array_async (string[] sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError,
DBusError {
UnixInputStream input;
UnixOutputStream output;
pipe (out input, out output);
@@ -221,7 +221,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
return result;
}
- public override GLib.Variant? update_blank (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public override GLib.Variant? update_blank (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
// use separate main context for sync operation
var context = new MainContext ();
var loop = new MainLoop (context, false);
@@ -236,7 +236,7 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
return update_blank_async.end (async_res);
}
- public async override GLib.Variant? update_blank_async (string sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async override GLib.Variant? update_blank_async (string sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError,
DBusError {
UnixInputStream input;
UnixOutputStream output;
pipe (out input, out output);
diff --git a/src/libtracker-sparql/tracker-connection.vala b/src/libtracker-sparql/tracker-connection.vala
index eb869f2..dec849a 100644
--- a/src/libtracker-sparql/tracker-connection.vala
+++ b/src/libtracker-sparql/tracker-connection.vala
@@ -226,7 +226,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public abstract Cursor query (string sparql, Cancellable? cancellable = null) throws Sparql.Error,
IOError, DBusError;
+ public abstract Cursor query (string sparql, Cancellable? cancellable = null) throws Sparql.Error,
GLib.Error, GLib.IOError, DBusError;
/**
* tracker_sparql_connection_query_finish:
@@ -256,7 +256,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public async abstract Cursor query_async (string sparql, Cancellable? cancellable = null) throws
Sparql.Error, IOError, DBusError;
+ public async abstract Cursor query_async (string sparql, Cancellable? cancellable = null) throws
Sparql.Error, GLib.Error, GLib.IOError, DBusError;
/**
* tracker_sparql_connection_update:
@@ -271,7 +271,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public virtual void update (string sparql, int priority = GLib.Priority.DEFAULT, Cancellable?
cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public virtual void update (string sparql, int priority = GLib.Priority.DEFAULT, Cancellable?
cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
warning ("Interface 'update' not implemented");
}
@@ -300,7 +300,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public async virtual void update_async (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async virtual void update_async (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
warning ("Interface 'update_async' not implemented");
}
@@ -365,7 +365,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public async virtual GenericArray<Error?>? update_array_async (string[] sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async virtual GenericArray<Error?>? update_array_async (string[] sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError,
DBusError {
warning ("Interface 'update_array_async' not implemented");
return null;
}
@@ -386,7 +386,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public virtual GLib.Variant? update_blank (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public virtual GLib.Variant? update_blank (string sparql, int priority = GLib.Priority.DEFAULT,
Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError, DBusError {
warning ("Interface 'update_blank' not implemented");
return null;
}
@@ -420,7 +420,7 @@ public abstract class Tracker.Sparql.Connection : Object {
*
* Since: 0.10
*/
- public async virtual GLib.Variant? update_blank_async (string sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, IOError, DBusError {
+ public async virtual GLib.Variant? update_blank_async (string sparql, int priority =
GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, GLib.Error, GLib.IOError,
DBusError {
warning ("Interface 'update_blank_async' not implemented");
return null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]