I don't realy understand ; i already made some kind of error management. My error management is working as a thread : All thrown exceptions are catched by a catch(Exception e) so i can after call my CrashReporter.instance.generateNewCrashReport. In all cases the LWJGLException is correctly working, maybe you're not using it right... If you want i can give you a code example that is working :
try {
if (isWindowed){
Display.setDisplayMode(new org.lwjgl.opengl.DisplayMode(sizeX, sizeY));
} else {
Display.setDisplayMode(Display.getDesktopDisplayMode());
}
Display.setFullscreen(!isWindowed);
Display.setTitle(gameName);
Display.create();
log.info("Starting LWJGL - OpenAL...");
AL.create();
log.info("LWJGL - OpenAL successfully started !");
Mouse.create();
Keyboard.create();
initOpenGL();
init();
ByteBuffer[] shit = new ByteBuffer[2];
if (getIconPackage() == null) {
shit[0] = renderEngine.mountTexture(SLDTGame.class.getResourceAsStream("icon16.png"));
shit[1] = renderEngine.mountTexture(SLDTGame.class.getResourceAsStream("icon32.png"));
} else {
shit[0] = renderEngine.mountTexture(ClassLoader.getSystemResourceAsStream("./" + getIconPackage() + "/gameIcon16.png"));
shit[1] = renderEngine.mountTexture(ClassLoader.getSystemResourceAsStream("./" + getIconPackage() + "/gameIcon32.png"));
}
Display.setIcon(shit);
//Mouse.setNativeCursor(new org.lwjgl.input.Cursor(16, 16, 0, 0, 1, getHandMousePointer(), null));
while (!Display.isCloseRequested()){
Display.update();
gameTimer.updateTimer();
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
for (int j = 0; j < gameTimer.elapsedTicks; j++) {
update();
}
render();
updateFPS();
}
closeGame();
} catch (Exception e){
onGameCrash(e);
}
Imagine that this function is called like in a thread named "GameName" - Main Thread This is the thread of OpenGL. When something in the game code is generating an exception, the exception is always catched by onGameCrash(e). This function is part of my game engine it's called at every thrown exception, you can do whatever you want with that.
If you want to know more, i can tell you that onGameCrash will call an ExceptionHandler interface that the game must have implemented.
For Exaple :
package fr.scrable.main;
import fr.sldt.gameEngine.ExceptionHandler;
public class ScrableGameExceptionHandler implements ExceptionHandler{
public void handleException(Exception e) {
e.printStackTrace();
System.exit(0);
}
}
This is the code witch will be called at every exception thrown. In my case i just print the exception and i simple hard close the game, like CTRL + ALT + SUPPR...
Hope i helped you,
Yuri6037