Ver Fonte

fixes stack display in both debugger and console for hl threads

Nicolas Cannasse há 2 anos atrás
pai
commit
c21d76ea6d
1 ficheiros alterados com 3 adições e 1 exclusões
  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);
 		});