* Uncaught exception handler now set only on render thread instead of entire VM

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7356 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent d6df196a2a
commit e05c94564f
  1. 3
      engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java

@ -89,7 +89,8 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
protected void initInThread(){ protected void initInThread(){
try{ try{
if (!JmeSystem.isLowPermissions()){ if (!JmeSystem.isLowPermissions()){
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { // Enable uncaught exception handler only for current thread
Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread thread, Throwable thrown) { public void uncaughtException(Thread thread, Throwable thrown) {
listener.handleError("Uncaught exception thrown in "+thread.toString(), thrown); listener.handleError("Uncaught exception thrown in "+thread.toString(), thrown);
} }

Loading…
Cancel
Save