浏览代码

another fix at HL exception report with haxe 4.1

Nicolas Cannasse 4 年之前
父节点
当前提交
d8a51831fe
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hxd/System.hl.hx

+ 4 - 0
hxd/System.hl.hx

@@ -124,7 +124,11 @@ class System {
 	}
 
 	static function runMainLoop() {
+		#if (haxe_ver >= 4.1)
+		var reportError = function(e:Dynamic) reportError(Std.isOfType(e,haxe.Exception)?e:new haxe.Exception(Std.string(e),null,e));
+		#else
 		var reportError = function(e) reportError(e);
+		#end
 		#if hxtelemetry
 		var hxt = new hxtelemetry.HxTelemetry();
 		#end