[tracker/tracker-0.6] As GErrors exist for some reason, use them.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] As GErrors exist for some reason, use them.
- Date: Thu, 4 Jun 2009 11:46:43 -0400 (EDT)
commit 94bd1cf38f39f2646f9d74a2d7dc49e86281be31
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 4 17:41:01 2009 +0200
As GErrors exist for some reason, use them.
---
src/libtracker-data/tracker-data-manager.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 5fdf37b..ef77a85 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -146,6 +146,7 @@ tracker_data_manager_exec_no_reply (TrackerDBInterface *iface,
{
TrackerDBResultSet *result_set;
va_list args;
+ GError *error = NULL;
g_return_val_if_fail (TRACKER_IS_DB_INTERFACE (iface), FALSE);
g_return_val_if_fail (query != NULL, FALSE);
@@ -153,7 +154,7 @@ tracker_data_manager_exec_no_reply (TrackerDBInterface *iface,
tracker_nfs_lock_obtain ();
va_start (args, query);
- result_set = tracker_db_interface_execute_vquery (iface, NULL, query, args);
+ result_set = tracker_db_interface_execute_vquery (iface, &error, query, args);
va_end (args);
if (result_set) {
@@ -162,6 +163,12 @@ tracker_data_manager_exec_no_reply (TrackerDBInterface *iface,
tracker_nfs_lock_release ();
+ if (error) {
+ g_critical ("Error executing no reply query: %s\n",
+ error->message);
+ g_error_free (error);
+ }
+
return TRUE;
}
@@ -172,6 +179,7 @@ tracker_data_manager_exec (TrackerDBInterface *iface,
{
TrackerDBResultSet *result_set;
va_list args;
+ GError *error = NULL;
g_return_val_if_fail (TRACKER_IS_DB_INTERFACE (iface), NULL);
g_return_val_if_fail (query != NULL, NULL);
@@ -180,13 +188,18 @@ tracker_data_manager_exec (TrackerDBInterface *iface,
va_start (args, query);
result_set = tracker_db_interface_execute_vquery (iface,
- NULL,
+ &error,
query,
args);
va_end (args);
tracker_nfs_lock_release ();
+ if (error) {
+ g_critical ("Error executing query: %s", error->message);
+ g_error_free (error);
+ }
+
return result_set;
}
@@ -197,17 +210,24 @@ tracker_data_manager_exec_proc (TrackerDBInterface *iface,
{
TrackerDBResultSet *result_set;
va_list args;
+ GError *error = NULL;
g_return_val_if_fail (TRACKER_IS_DB_INTERFACE (iface), NULL);
g_return_val_if_fail (procedure != NULL, NULL);
va_start (args, procedure);
result_set = tracker_db_interface_execute_vprocedure (iface,
- NULL,
+ &error,
procedure,
args);
va_end (args);
+ if (error) {
+ g_critical ("Error executing stored procedure '%s': %s",
+ procedure, error->message);
+ g_error_free (error);
+ }
+
return result_set;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]