Explorar el Código

fixes stack display in both debugger and console for hl threads

Nicolas Cannasse hace 2 años
padre
commit
c21d76ea6d
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      std/hl/_std/sys/thread/Thread.hx

+ 3 - 1
std/hl/_std/sys/thread/Thread.hx

@@ -148,12 +148,14 @@ private class HaxeThread {
 				item.handle = currentHandle();
 			}
 			try {
+				hl.Api.setErrorHandler(function(_){});
 				callb();
 				if(withEventLoop)
 					item.events.loop();
 			} catch(e) {
+				hl.Api.setErrorHandler(null);
 				dropThread(item);
-				throw e;
+				hl.Api.rethrow(e);
 			}
 			dropThread(item);
 		});