<commit_before>package de.lessvoid.coregl;


import java.util.logging.Logger;

import static org.lwjgl.opengl.GL11.*;
import org.lwjgl.util.glu.GLU;

public class CheckGL {
  private static Logger log = Logger.getLogger(CheckGL.class.getName());

  public static void checkGLError(final String message) {
    int error = glGetError();
    while (error != GL_NO_ERROR) {
      String glerrmsg = GLU.gluErrorString(error);
      log.warning("OpenGL Error: (" + error + ") " + glerrmsg + " {" + message + "}");
      error = glGetError();
    }
  }
}<commit_msg>add stacktrace when logging opengl errors<commit_after>package de.lessvoid.coregl;


import java.util.logging.Logger;

import static org.lwjgl.opengl.GL11.*;
import org.lwjgl.util.glu.GLU;

public class CheckGL {
  private static Logger log = Logger.getLogger(CheckGL.class.getName());

  public static void checkGLError(final String message) {
    int error = glGetError();
    while (error != GL_NO_ERROR) {
      String glerrmsg = GLU.gluErrorString(error);
      StringBuffer stacktrace = new StringBuffer();
      for (StackTraceElement e : Thread.currentThread().getStackTrace()) {
        stacktrace.append(e.toString());
        stacktrace.append("\n");
      }
      log.warning("OpenGL Error: (" + error + ") " + glerrmsg + " {" + message + "} " + stacktrace.toString());
      error = glGetError();
    }
  }
}
{'fraction_non_alphanumeric': 0.13695652173913042, 'fraction_numerical': 0.002898550724637681, 'mean_word_length': 3.5427631578947367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3008845', 'n_tokens_mistral': 450, 'n_tokens_neox': 438, 'n_words': 94}