Managing errors

You can manage errors with GdaError class and obtain them with function gda_connection_get_errors() so let's see them and an example:

Here you see the functions to manage errors:

Here you can see an example of using this:

      get_errors (GdaConnection *connection)
        GList *list;
        GList *node;
        GdaError *error;
(1)        list = (GList *) gda_connection_get_errors (connection);
(2)        for (node = g_list_first (list); node != NULL; node = g_list_next (node))
            error = (GdaError *) node->data;
            g_print ("Error no: %d\t", gda_error_get_number (error));
            g_print ("desc: %s\t", gda_error_get_description (error));
            g_print ("source: %s\t", gda_error_get_source (error));
            g_print ("sqlstate: %s\n", gda_error_get_sqlstate (error));
Obtains errors list.
Loop for getting error information.