-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/db/dbconnect.sqc | 12 | ||||
-rw-r--r-- | src/util/check_error.c | 6 | ||||
-rw-r--r-- | src/util/check_error_db.c | 13 | ||||
-rw-r--r-- | src/util/check_error_db.h | 9 |
5 files changed, 36 insertions, 6 deletions
diff --git a/src/util/check_error_db.c b/src/util/check_error_db.c new file mode 100644 index 0000000..a6b7f51 --- a/dev/null +++ b/src/util/check_error_db.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include "check_error_db.h" | ||
2 | #include "sqlinfoprint.h" | ||
3 | #include <stdlib.h> | ||
4 | extern struct sqlca sqlca; | ||
5 | |||
6 | void | ||
7 | check_error_db (const char *filename, const unsigned int linenum) | ||
8 | { | ||
9 | if (sqlinfoprint ("DB Error", &sqlca, filename, linenum) == 1) | ||
10 | exit (EXIT_FAILURE); | ||
11 | |||
12 | return; | ||
13 | } | ||