summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/util/check_error.c13
-rw-r--r--src/util/sqlinfoprint.c73
-rw-r--r--src/util/sqlinfoprint.h15
3 files changed, 100 insertions, 1 deletions
diff --git a/src/util/check_error.c b/src/util/check_error.c
index dbe5b8f..cd00439 100644
--- a/src/util/check_error.c
+++ b/src/util/check_error.c
@@ -1,10 +1,16 @@
#include <GL/glut.h>
#include <error.h>
#include <errno.h>
+#include "sqlinfoprint.h"
+extern struct sqlca sqlca;
void
-check_error (const char *filename, unsigned int linenum)
+check_error (const char *filename, const unsigned int linenum)
{
+
+ /*
+ * Check for an error from the OpenGL API.
+ */
GLenum errCode = glGetError ();
if (errCode != GL_NO_ERROR)
{
@@ -13,5 +19,10 @@ check_error (const char *filename, unsigned int linenum)
"OpenGL Error %s", errString);
}
+ /*
+ * Check for an error from the Database API.
+ */
+ sqlinfoprint ("DB Error", &sqlca, filename, linenum);
+
return;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.