Browse Source

[lua] fix global error handler

Justin Donaldson 5 years ago
parent
commit
77e5f96315
1 changed files with 3 additions and 2 deletions
  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