[libgda] GdaBrowser: improved debug message
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaBrowser: improved debug message
- Date: Sat, 24 Sep 2011 19:49:58 +0000 (UTC)
commit 51bac19aaa4a38ac8918abdaa2119bfc701931d8
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Sep 24 21:41:10 2011 +0200
GdaBrowser: improved debug message
tools/browser/common/ui-formgrid.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/tools/browser/common/ui-formgrid.c b/tools/browser/common/ui-formgrid.c
index 56b9c0b..2cb9c22 100644
--- a/tools/browser/common/ui-formgrid.c
+++ b/tools/browser/common/ui-formgrid.c
@@ -1143,9 +1143,14 @@ compute_modification_statements (UiFormGrid *formgrid, GdaDataModel *model)
for (mod = MOD_INSERT; mod < MOD_LAST; mod++) {
if (formgrid->priv->mod_stmt[mod]) {
gchar *sql;
+ GError *lerror = NULL;
sql = gda_statement_to_sql_extended (formgrid->priv->mod_stmt[mod], NULL, NULL,
- GDA_STATEMENT_SQL_PARAMS_LONG, NULL, NULL);
- g_print ("STMT[%d] = [%s]\n", mod, sql);
+ GDA_STATEMENT_SQL_PARAMS_LONG, NULL, &lerror);
+ g_print ("STMT[%d] = [%s]", mod, sql ? sql : "ERR");
+ if (!sql)
+ g_print (" --- %s", lerror && lerror->message ? lerror->message : "No detail");
+ g_clear_error (&lerror);
+ g_print ("\n");
g_free (sql);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]