[tracker] libtracker-direct: Fix compilation warning in vala code
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-direct: Fix compilation warning in vala code
- Date: Mon, 6 Dec 2010 13:12:24 +0000 (UTC)
commit d071e4f1fbec69d55a0475f6e21c8662355a71aa
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Dec 6 14:11:43 2010 +0100
libtracker-direct: Fix compilation warning in vala code
src/libtracker-direct/tracker-direct.vala | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-direct/tracker-direct.vala b/src/libtracker-direct/tracker-direct.vala
index 884b053..4551e45 100644
--- a/src/libtracker-direct/tracker-direct.vala
+++ b/src/libtracker-direct/tracker-direct.vala
@@ -70,22 +70,32 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
public async override Sparql.Cursor query_async (string sparql, Cancellable? cancellable) throws Sparql.Error, IOError, DBusError {
if (!DBManager.trylock ()) {
// run in a separate thread
- Error job_error = null;
+ Sparql.Error sparql_error = null;
+ IOError io_error = null;
+ DBusError dbus_error = null;
Sparql.Cursor result = null;
g_io_scheduler_push_job (job => {
try {
result = query (sparql, cancellable);
- } catch (Error e) {
- job_error = e;
+ } catch (IOError e_io) {
+ io_error = e_io;
+ } catch (Sparql.Error e_spql) {
+ sparql_error = e_spql;
+ } catch (DBusError e_dbus) {
+ dbus_error = e_dbus;
}
query_async.callback ();
return false;
});
yield;
- if (job_error != null) {
- throw job_error;
+ if (sparql_error != null) {
+ throw sparql_error;
+ } else if (io_error != null) {
+ throw io_error;
+ } else if (dbus_error != null) {
+ throw dbus_error;
} else {
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]