浏览代码

fixes stack display in both debugger and console for hl threads

Nicolas Cannasse 2 年之前
父节点
当前提交
c21d76ea6d
共有 1 个文件被更改,包括 3 次插入1 次删除
  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();
 				item.handle = currentHandle();
 			}
 			}
 			try {
 			try {
+				hl.Api.setErrorHandler(function(_){});
 				callb();
 				callb();
 				if(withEventLoop)
 				if(withEventLoop)
 					item.events.loop();
 					item.events.loop();
 			} catch(e) {
 			} catch(e) {
+				hl.Api.setErrorHandler(null);
 				dropThread(item);
 				dropThread(item);
-				throw e;
+				hl.Api.rethrow(e);
 			}
 			}
 			dropThread(item);
 			dropThread(item);
 		});
 		});