Explorar o código

fixes stack display in both debugger and console for hl threads

Nicolas Cannasse %!s(int64=2) %!d(string=hai) anos
pai
achega
c21d76ea6d
Modificáronse 1 ficheiros con 3 adicións e 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);
 		});