_hx_handle_error.lua 307 B

123456789101112
  1. function _hx_handle_error(obj)
  2. if obj.value then
  3. _G.print("runtime error:\n " .. _hx_tostring(obj.value));
  4. else
  5. _G.print("runtime error:\n " .. tostring(obj));
  6. end
  7. if _G.debug and _G.debug.traceback then
  8. _G.print(_G.debug.traceback());
  9. end
  10. _G.os.exit(1)
  11. end