<commit_before>#include "CShader.h"

#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <streambuf>
#include <cstdlib>


bool printOpenGLErrors(std::string const & Location)
{
	bool Succeeded = true;

	GLenum glErr = glGetError();
	while (glErr != GL_NO_ERROR)
	{
		std::cerr << "OpenGL Error at " << Location << ": " << gluErrorString(glErr) << std::endl;
		Succeeded = false;
		glErr = glGetError();
	}

	return Succeeded;
}

bool printOpenGLErrors()
{
	bool Succeeded = true;

	GLenum glErr = glGetError();
	while (glErr != GL_NO_ERROR)
	{
		std::cerr << "OpenGL Error: " << gluErrorString(glErr) << std::endl;
		Succeeded = false;
		glErr = glGetError();
	}

	return Succeeded;
}


CShader::CShader()
{}

GLuint const CShader::getProgramHandle() const<commit_msg>+ Fixed error message printing for OpenGL errors (sometimes null)<commit_after>#include "CShader.h"

#include <ionCore.h>

#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <streambuf>
#include <cstdlib>


bool printOpenGLErrors(std::string const & Location)
{
	bool Succeeded = true;

	GLenum glErr = glGetError();
	while (glErr != GL_NO_ERROR)
	{
		c8 const * const ErrorString = (c8 const * const) gluErrorString(glErr);
		std::cerr << "OpenGL Error at " << Location << ": " << (ErrorString ? ErrorString : "Error Code is not valid") << std::endl;
		Succeeded = false;
		glErr = glGetError();
	}

	return Succeeded;
}

bool printOpenGLErrors()
{
	bool Succeeded = true;

	GLenum glErr = glGetError();
	while (glErr != GL_NO_ERROR)
	{
		std::cerr << "OpenGL Error: " << gluErrorString(glErr) << std::endl;
		Succeeded = false;
		glErr = glGetError();
	}

	return Succeeded;
}


CShader::CShader()
{}

GLuint const CShader::getProgramHandle() const
{'fraction_non_alphanumeric': 0.1473389355742297, 'fraction_numerical': 0.0011204481792717086, 'mean_word_length': 4.894389438943894, 'pattern_counts': {'":': 2, '<': 48, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3668796', 'n_tokens_mistral': 699, 'n_tokens_neox': 650, 'n_words': 158}