summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/Makefile.am2
-rw-r--r--src/db/dbconnect.sqc12
-rw-r--r--src/util/check_error.c6
-rw-r--r--src/util/check_error_db.c13
-rw-r--r--src/util/check_error_db.h9
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 @@
+#include "check_error_db.h"
+#include "sqlinfoprint.h"
+#include <stdlib.h>
+extern struct sqlca sqlca;
+
+void
+check_error_db (const char *filename, const unsigned int linenum)
+{
+ if (sqlinfoprint ("DB Error", &sqlca, filename, linenum) == 1)
+ exit (EXIT_FAILURE);
+
+ return;
+}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.