path:
root/
src/
util/
check_error.c (
plain)
blob: cd0043967782a3b9a1f0d15d375c32be8863b11a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <GL/glut.h>
#include <error.h>
#include <errno.h>
#include "sqlinfoprint.h"
extern struct sqlca sqlca;
void
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)
{
const GLubyte *errString = gluErrorString (errCode);
error_at_line (-1, errno, filename, linenum,
"OpenGL Error %s", errString);
}
/*
* Check for an error from the Database API.
*/
sqlinfoprint ("DB Error", &sqlca, filename, linenum);
return;
}
|