AWTGLCanvas: Added exceptionOccurred to allow users to be notified of unhandled LWJGLExceptions in paint()
This commit is contained in:
parent
de0a724da7
commit
1005813acc
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue