diff --git a/src/java/org/lwjgl/opengl/AWTGLCanvas.java b/src/java/org/lwjgl/opengl/AWTGLCanvas.java index 0bbf590f..774bdfde 100644 --- a/src/java/org/lwjgl/opengl/AWTGLCanvas.java +++ b/src/java/org/lwjgl/opengl/AWTGLCanvas.java @@ -324,11 +324,21 @@ public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener, peer_info.unlock(); } } catch (LWJGLException e) { - LWJGLUtil.log("Failed to lock surface, skipping paint(): " + e); + exceptionOccurred(e); } } } + /** + * This method will be called if an unhandled LWJGLException occurs in paint(). + * Override this method to be notified of this. + * + * @param exception The exception that occurred. + */ + protected void exceptionOccurred(LWJGLException exception) { + LWJGLUtil.log("Unhandled exception occurred, skipping paint(): " + exception); + } + /** * override update to avoid clearing */