소스 검색

[lua] fix global error handler

Justin Donaldson 5 년 전
부모
커밋
77e5f96315
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      std/lua/_lua/_hx_tostring.lua

+ 3 - 2
std/lua/_lua/_hx_tostring.lua

@@ -97,10 +97,11 @@ function _hx_tostring(obj, depth)
 end
 
 function _hx_error(obj)
+    print(obj)
     if obj.value then
-        "Runtime Error: " + _G.print(_hx_tostring(obj.value));
+        _G.print("Runtime Error: " .. _hx_tostring(obj.value));
     else
-        "Runtime Error: " + _G.print(tostring(obj))
+        _G.print("Runtime Error: " .. tostring(obj));
     end
 
     if _G.debug and _G.debug.traceback then