[libgda: 1/2] gda-postgresql-ddl.c: Error reporting added
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 1/2] gda-postgresql-ddl.c: Error reporting added
- Date: Fri, 31 Jan 2020 16:39:58 +0000 (UTC)
commit 26115e5b1ac3d3b10f3bcb5139cc845d798c55b0
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Fri Jan 31 00:16:17 2020 -0600
gda-postgresql-ddl.c: Error reporting added
An error will be reported if GdaDataHandler instance
has an invalid type.
providers/postgres/gda-postgres-ddl.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/providers/postgres/gda-postgres-ddl.c b/providers/postgres/gda-postgres-ddl.c
index ed4f111a6..15f59047c 100644
--- a/providers/postgres/gda-postgres-ddl.c
+++ b/providers/postgres/gda-postgres-ddl.c
@@ -1074,7 +1074,15 @@ gda_postgres_render_CREATE_USER (GdaServerProvider *provider, GdaConnection *cnc
else
g_object_ref (dh);
- g_assert (dh); // If fails, the type in dh is not implemented. It is a bug.
+ if (!dh) {
+ g_set_error (error,
+ GDA_SERVER_OPERATION_ERROR,
+ GDA_SERVER_OPERATION_INCORRECT_VALUE_ERROR,
+ "%s: %s",
+ G_STRLOC,
+ _ ("Dataholder type is unknown. Report this as a bug."));
+ return NULL;
+ }
g_string_append (string, " VALID UNTIL ");
tmp = gda_data_handler_get_sql_from_value (dh, value);
g_object_unref (dh);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]