|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|
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. | |
| void | db_set_error_who (const char *me) |
| Set 'who' for error messages. | |
| const char * | db_get_error_who (void) |
| void | db_error (const char *s) |
| Report error message. | |
| void | db_protocol_error (void) |
| Report protocol error. | |
| void | db_syserror (const char *s) |
| Report system error. | |
| int | db_get_error_code (void) |
| Get error code. | |
| void | db_memory_error (void) |
| Report memory error. | |
| void | db_procedure_not_implemented (const char *name) |
| Report 'not implemented' error. | |
| void | db_noproc_error (int procnum) |
| Report no procedure error. | |
| void | db_clear_error (void) |
| Clear error status. | |
| void | db_print_error (void) |
| Print error. | |
| void | db_debug_on (void) |
| Turn on debugging. | |
| void | db_debug_off (void) |
| Turn off debugging. | |
| void | db_debug (const char *s) |
| Print debug message. | |
| const char * | db_get_error_msg (void) |
| Get error message. | |
| void | db_auto_print_errors (int flag) |
| Toggles printing of DBMI error messages. | |
| void | db_auto_print_protocol_errors (int flag) |
| Set auto print protocol error. | |
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.
Toggles printing of DBMI error messages.
| flag | ? |
Definition at line 247 of file db/dbmi_base/error.c.
Referenced by db_driver().
Set auto print protocol error.
| flag | ? |
Definition at line 258 of file db/dbmi_base/error.c.
Referenced by db_driver().
Clear error status.
Definition at line 170 of file db/dbmi_base/error.c.
References DB_OK.
Referenced by db_dirent(), and db_driver().
Turn off debugging.
Definition at line 216 of file db/dbmi_base/error.c.
Turn on debugging.
Definition at line 208 of file db/dbmi_base/error.c.
Report error message.
| s | error message (can be NULL) |
Definition at line 69 of file db/dbmi_base/error.c.
References _, DB_FAILED, db_free(), db_print_error(), db_store(), and NULL.
Referenced by db__recv_return_code(), db__recv_table_data(), db__recv_value(), db__send_value(), db_convert_Cstring_to_value(), db_convert_value_to_string(), db_d_bind_update(), 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(), db_protocol_error(), db_set_index_column_name(), db_start_driver(), and db_syserror().
Get error code.
Definition at line 125 of file db/dbmi_base/error.c.
References DB_OK.
Referenced by db__recv_index(), db__recv_index_array(), db__recv_table_definition(), db_alloc_cursor_column_flags(), db_alloc_cursor_table(), db_alloc_index_columns(), db_d_open_insert_cursor(), db_d_open_select_cursor(), db_d_open_update_cursor(), and db_set_index_column_name().
Get error message.
Definition at line 237 of file db/dbmi_base/error.c.
References NULL.
Referenced by db__send_failure().
brief Get 'who' string
Definition at line 59 of file db/dbmi_base/error.c.
Report memory error.
Definition at line 133 of file db/dbmi_base/error.c.
References _, db_error(), and DB_MEMORY_ERR.
Referenced by db_calloc(), db_malloc(), and db_realloc().
Report no procedure error.
| procnum | procedure number |
Definition at line 158 of file db/dbmi_base/error.c.
References _, db_error(), DB_NOPROC, and procnum.
Referenced by db__start_procedure_call().
User defined error procedure.
| f | pointer to user-defined function |
Definition at line 36 of file db/dbmi_base/error.c.
Print error.
If not defined, the error message is printed to stderr.
Definition at line 182 of file db/dbmi_base/error.c.
Referenced by db_error().
Report 'not implemented' error.
| name | name of functionality |
Definition at line 144 of file db/dbmi_base/error.c.
References _, db_error(), DB_NOPROC, and name.
Referenced by db__driver_add_column(), db__driver_bind_update(), db__driver_close_cursor(), db__driver_close_database(), db__driver_create_database(), db__driver_create_table(), db__driver_delete(), db__driver_delete_database(), db__driver_describe_table(), db__driver_drop_column(), db__driver_drop_index(), db__driver_drop_table(), db__driver_execute_immediate(), db__driver_fetch(), 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(), db__driver_open_select_cursor(), db__driver_open_update_cursor(), and db__driver_update().
Report protocol error.
Definition at line 85 of file db/dbmi_base/error.c.
References _, db_error(), and DB_PROTOCOL_ERR.
Referenced by db__recv_char(), db__recv_double(), db__recv_double_array(), db__recv_float(), db__recv_float_array(), db__recv_int(), db__recv_int_array(), db__recv_return_code(), db__recv_short(), db__recv_short_array(), db__recv_string(), db__recv_string_array(), db__send_char(), db__send_double(), db__send_double_array(), db__send_float(), db__send_float_array(), db__send_int(), db__send_int_array(), db__send_short(), db__send_short_array(), db__send_string(), and db__start_procedure_call().
Set 'who' for error messages.
| me | my name |
Definition at line 46 of file db/dbmi_base/error.c.
References db_free(), and db_store().
Report system error.
| s | error message |
Definition at line 101 of file db/dbmi_base/error.c.
References db_error().
Referenced by db_dirent(), db_driver(), db_read_dbmscap(), and db_start_driver().