-rw-r--r-- | src/util/check_error.c | 13 | ||||
-rw-r--r-- | src/util/sqlinfoprint.c | 73 | ||||
-rw-r--r-- | src/util/sqlinfoprint.h | 15 |
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 @@ | |||
1 | #include <GL/glut.h> | 1 | #include <GL/glut.h> |
2 | #include <error.h> | 2 | #include <error.h> |
3 | #include <errno.h> | 3 | #include <errno.h> |
4 | #include "sqlinfoprint.h" | ||
5 | extern struct sqlca sqlca; | ||
4 | 6 | ||
5 | void | 7 | void |
6 | check_error (const char *filename, unsigned int linenum) | 8 | check_error (const char *filename, const unsigned int linenum) |
7 | { | 9 | { |
10 | |||
11 | /* | ||
12 | * Check for an error from the OpenGL API. | ||
13 | */ | ||
8 | GLenum errCode = glGetError (); | 14 | GLenum errCode = glGetError (); |
9 | if (errCode != GL_NO_ERROR) | 15 | if (errCode != GL_NO_ERROR) |
10 | { | 16 | { |
@@ -13,5 +19,10 @@ check_error (const char *filename, unsigned int linenum) | |||
13 | "OpenGL Error %s", errString); | 19 | "OpenGL Error %s", errString); |
14 | } | 20 | } |
15 | 21 | ||
22 | /* | ||
23 | * Check for an error from the Database API. | ||
24 | */ | ||
25 | sqlinfoprint ("DB Error", &sqlca, filename, linenum); | ||
26 | |||
16 | return; | 27 | return; |
17 | } | 28 | } |