libgda r3199 - in trunk: . libgda libgda/sqlite providers/firebird providers/mysql providers/postgres providers/skel-implementation/capi
- From: vivien svn gnome org
- To: svn-commits-list gnome org
- Subject: libgda r3199 - in trunk: . libgda libgda/sqlite providers/firebird providers/mysql providers/postgres providers/skel-implementation/capi
- Date: Mon, 1 Sep 2008 18:58:22 +0000 (UTC)
Author: vivien
Date: Mon Sep 1 18:58:21 2008
New Revision: 3199
URL: http://svn.gnome.org/viewvc/libgda?rev=3199&view=rev
Log:
2008-09-01 Vivien Malerba <malerba gnome-db org>
* providers/skel-implementation/capi/gda-capi-recordset.c:
* providers/firebird/gda-firebird-recordset.c:
* providers/mysql/gda-mysql-recordset.c:
* providers/postgres/gda-postgres-recordset.c:
* libgda/sqlite/gda-sqlite-recordset.c:
* libgda/gda-data-model-dir.c:
* libgda/gda-data-model-bdb.c:
* libgda/gda-data-model-array.c: harmonized error messages
Modified:
trunk/ChangeLog
trunk/libgda/gda-data-model-array.c
trunk/libgda/gda-data-model-bdb.c
trunk/libgda/gda-data-model-dir.c
trunk/libgda/sqlite/gda-sqlite-recordset.c
trunk/providers/firebird/gda-firebird-recordset.c
trunk/providers/mysql/gda-mysql-recordset.c
trunk/providers/postgres/gda-postgres-recordset.c
trunk/providers/skel-implementation/capi/gda-capi-recordset.c
Modified: trunk/libgda/gda-data-model-array.c
==============================================================================
--- trunk/libgda/gda-data-model-array.c (original)
+++ trunk/libgda/gda-data-model-array.c Mon Sep 1 18:58:21 2008
@@ -604,7 +604,7 @@
if (row > amodel->priv->rows->len) {
g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA_MODEL_VALUES_LIST_ERROR,
- _("Row number out of range"));
+ _("Row %d out of range (0-%d)"), row, amodel->priv->rows->len);
return FALSE;
}
Modified: trunk/libgda/gda-data-model-bdb.c
==============================================================================
--- trunk/libgda/gda-data-model-bdb.c (original)
+++ trunk/libgda/gda-data-model-bdb.c Mon Sep 1 18:58:21 2008
@@ -604,7 +604,10 @@
g_return_val_if_fail (imodel->priv, NULL);
if ((col < 0) || (col > imodel->priv->n_columns)) {
- add_error (imodel, _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, imodel->priv->n_columns - 1);
+ add_error (imodel, tmp);
+ g_free (tmp);
return NULL;
}
@@ -701,7 +704,10 @@
g_return_val_if_fail (imodel->priv, 0);
if ((col < 0) || (col > imodel->priv->n_columns)) {
- add_error (imodel, _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, imodel->priv->n_columns - 1);
+ add_error (imodel, tmp);
+ g_free (tmp);
return 0;
}
@@ -727,7 +733,10 @@
g_return_val_if_fail (imodel->priv, FALSE);
if ((col < 0) || (col > imodel->priv->n_columns)) {
- add_error (imodel, _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, imodel->priv->n_columns - 1);
+ add_error (imodel, tmp);
+ g_free (tmp);
return FALSE;
}
Modified: trunk/libgda/gda-data-model-dir.c
==============================================================================
--- trunk/libgda/gda-data-model-dir.c (original)
+++ trunk/libgda/gda-data-model-dir.c Mon Sep 1 18:58:21 2008
@@ -787,7 +787,10 @@
g_return_val_if_fail (imodel->priv, NULL);
if ((col < 0) || (col > COL_LAST)) {
- add_error (imodel, _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, COL_LAST-1);
+ add_error (imodel, tmp);
+ g_free (tmp);
return NULL;
}
@@ -873,7 +876,10 @@
g_return_val_if_fail (imodel->priv, 0);
if ((col < 0) || (col > COL_LAST)) {
- add_error (imodel, _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, COL_LAST-1);
+ add_error (imodel, tmp);
+ g_free (tmp);
return 0;
}
@@ -912,9 +918,11 @@
g_return_val_if_fail (imodel->priv, FALSE);
if ((col < 0) || (col > COL_LAST)) {
- add_error (imodel, _("Column number out of range"));
- g_set_error (error, 0, 0,
- _("Column number out of range"));
+ gchar *tmp;
+ tmp = g_strdup_printf (_("Column %d out of range (0-%d)"), col, COL_LAST-1);
+ add_error (imodel, tmp);
+ g_set_error (error, 0, 0, tmp);
+ g_free (tmp);
return FALSE;
}
Modified: trunk/libgda/sqlite/gda-sqlite-recordset.c
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-recordset.c (original)
+++ trunk/libgda/sqlite/gda-sqlite-recordset.c Mon Sep 1 18:58:21 2008
@@ -220,7 +220,7 @@
if (col_types [i] == G_TYPE_NONE)
break;
if (i >= _GDA_PSTMT (ps)->ncols)
- g_warning (_("Column %d is out of range (0-%d), ignoring its specified type"), i,
+ g_warning (_("Column %d out of range (0-%d), ignoring its specified type"), i,
_GDA_PSTMT (ps)->ncols - 1);
else
_GDA_PSTMT (ps)->types [i] = col_types [i];
Modified: trunk/providers/firebird/gda-firebird-recordset.c
==============================================================================
--- trunk/providers/firebird/gda-firebird-recordset.c (original)
+++ trunk/providers/firebird/gda-firebird-recordset.c Mon Sep 1 18:58:21 2008
@@ -174,7 +174,7 @@
if (col_types [i] == G_TYPE_NONE)
break;
if (i >= _GDA_PSTMT (ps)->ncols)
- g_warning (_("Column %d is out of range (0-%d), ignoring its specified type"), i,
+ g_warning (_("Column %d out of range (0-%d), ignoring its specified type"), i,
_GDA_PSTMT (ps)->ncols - 1);
else
_GDA_PSTMT (ps)->types [i] = col_types [i];
Modified: trunk/providers/mysql/gda-mysql-recordset.c
==============================================================================
--- trunk/providers/mysql/gda-mysql-recordset.c (original)
+++ trunk/providers/mysql/gda-mysql-recordset.c Mon Sep 1 18:58:21 2008
@@ -343,7 +343,7 @@
if (col_types [i] == G_TYPE_NONE)
break;
if (i >= _GDA_PSTMT (ps)->ncols)
- g_warning (_("Column %d is out of range (0-%d), ignoring its specified type"), i,
+ g_warning (_("Column %d out of range (0-%d), ignoring its specified type"), i,
_GDA_PSTMT (ps)->ncols - 1);
else
_GDA_PSTMT (ps)->types [i] = col_types [i];
Modified: trunk/providers/postgres/gda-postgres-recordset.c
==============================================================================
--- trunk/providers/postgres/gda-postgres-recordset.c (original)
+++ trunk/providers/postgres/gda-postgres-recordset.c Mon Sep 1 18:58:21 2008
@@ -276,7 +276,7 @@
if (col_types [i] == G_TYPE_NONE)
break;
if (i >= _GDA_PSTMT (ps)->ncols)
- g_warning (_("Column %d is out of range (0-%d), ignoring its specified type"), i,
+ g_warning (_("Column %d out of range (0-%d), ignoring its specified type"), i,
_GDA_PSTMT (ps)->ncols - 1);
else
_GDA_PSTMT (ps)->types [i] = col_types [i];
Modified: trunk/providers/skel-implementation/capi/gda-capi-recordset.c
==============================================================================
--- trunk/providers/skel-implementation/capi/gda-capi-recordset.c (original)
+++ trunk/providers/skel-implementation/capi/gda-capi-recordset.c Mon Sep 1 18:58:21 2008
@@ -175,7 +175,7 @@
if (col_types [i] == G_TYPE_NONE)
break;
if (i >= _GDA_PSTMT (ps)->ncols)
- g_warning (_("Column %d is out of range (0-%d), ignoring its specified type"), i,
+ g_warning (_("Column %d out of range (0-%d), ignoring its specified type"), i,
_GDA_PSTMT (ps)->ncols - 1);
else
_GDA_PSTMT (ps)->types [i] = col_types [i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]