GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
DBMI Library (base) - error management. More...
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <grass/dbmi.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
void | db_on_error (void(*f)(const char *)) |
User defined error procedure. More... | |
void | db_set_error_who (const char *me) |
Set 'who' for error messages. More... | |
const char * | db_get_error_who (void) |
void | db_error (const char *s) |
Report error message. More... | |
void | db_protocol_error (void) |
Report protocol error. More... | |
void | db_syserror (const char *s) |
Report system error. More... | |
int | db_get_error_code (void) |
Get error code. More... | |
void | db_memory_error (void) |
Report memory error. More... | |
void | db_procedure_not_implemented (const char *name) |
Report 'not implemented' error. More... | |
void | db_noproc_error (int procnum) |
Report no procedure error. More... | |
void | db_clear_error (void) |
Clear error status. More... | |
void | db_print_error (void) |
Print error. More... | |
void | db_debug_on (void) |
Turn on debugging. More... | |
void | db_debug_off (void) |
Turn off debugging. More... | |
void | db_debug (const char *s) |
Print debug message. More... | |
const char * | db_get_error_msg (void) |
Get error message. More... | |
void | db_auto_print_errors (int flag) |
Toggles printing of DBMI error messages. More... | |
void | db_auto_print_protocol_errors (int flag) |
Set auto print protocol error. More... | |
DBMI Library (base) - error management.
(C) 1999-2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file db/dbmi_base/error.c.
void db_auto_print_errors | ( | int | flag | ) |
Toggles printing of DBMI error messages.
flag | ? |
Definition at line 249 of file db/dbmi_base/error.c.
void db_auto_print_protocol_errors | ( | int | flag | ) |
Set auto print protocol error.
flag | ? |
Definition at line 260 of file db/dbmi_base/error.c.
void db_clear_error | ( | void | ) |
Clear error status.
Definition at line 171 of file db/dbmi_base/error.c.
void db_debug | ( | const char * | s | ) |
void db_debug_off | ( | void | ) |
Turn off debugging.
Definition at line 218 of file db/dbmi_base/error.c.
void db_debug_on | ( | void | ) |
Turn on debugging.
Definition at line 210 of file db/dbmi_base/error.c.
void db_error | ( | const char * | s | ) |
Report error message.
s | error message (can be NULL) |
Definition at line 69 of file db/dbmi_base/error.c.
Referenced by db__recv_value(), db__send_value(), db_convert_value_to_string(), db_d_close_cursor(), db_d_close_database(), db_d_delete(), db_d_insert(), db_d_open_database(), db_d_report_error(), db_d_update(), db_get_index_column_name(), db_memory_error(), db_noproc_error(), db_procedure_not_implemented(), and db_set_index_column_name().
int db_get_error_code | ( | void | ) |
Get error code.
Definition at line 126 of file db/dbmi_base/error.c.
Referenced by db__recv_index_array(), and db_set_index_column_name().
const char* db_get_error_msg | ( | void | ) |
Get error message.
Definition at line 239 of file db/dbmi_base/error.c.
Referenced by db__send_failure().
const char* db_get_error_who | ( | void | ) |
brief Get 'who' string
Definition at line 59 of file db/dbmi_base/error.c.
void db_memory_error | ( | void | ) |
Report memory error.
Definition at line 134 of file db/dbmi_base/error.c.
References _, and db_error().
void db_noproc_error | ( | int | procnum | ) |
Report no procedure error.
procnum | procedure number |
Definition at line 159 of file db/dbmi_base/error.c.
References _, and db_error().
Referenced by db__start_procedure_call().
void db_on_error | ( | void(*)(const char *) | f | ) |
User defined error procedure.
f | pointer to user-defined function |
Definition at line 36 of file db/dbmi_base/error.c.
void db_print_error | ( | void | ) |
Print error.
If not defined, the error message is printed to stderr.
Definition at line 183 of file db/dbmi_base/error.c.
void db_procedure_not_implemented | ( | const char * | name | ) |
Report 'not implemented' error.
name | name of functionality |
Definition at line 145 of file db/dbmi_base/error.c.
References _, and db_error().
Referenced by db__driver_add_column(), db__driver_bind_update(), db__driver_close_cursor(), db__driver_close_database(), db__driver_create_database(), db__driver_delete(), db__driver_delete_database(), db__driver_drop_column(), db__driver_drop_index(), db__driver_drop_table(), db__driver_execute_immediate(), db__driver_find_database(), db__driver_get_num_rows(), db__driver_insert(), db__driver_list_databases(), db__driver_list_indexes(), db__driver_list_tables(), db__driver_open_database(), db__driver_open_insert_cursor(), and db__driver_update().
void db_protocol_error | ( | void | ) |
Report protocol error.
Definition at line 85 of file db/dbmi_base/error.c.
Referenced by db__recv_int(), db__recv_short(), db__send_double_array(), db__send_float_array(), db__send_int(), db__send_int_array(), db__send_short_array(), and db__start_procedure_call().
void db_set_error_who | ( | const char * | me | ) |
Set 'who' for error messages.
me | my name |
Definition at line 46 of file db/dbmi_base/error.c.
void db_syserror | ( | const char * | s | ) |
Report system error.
s | error message |
Definition at line 101 of file db/dbmi_base/error.c.
Referenced by db_read_dbmscap().