Преглед изворни кода

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