_hx_handle_error.lua 274 B

12345678
  1. function _hx_handle_error(obj)
  2. local message = tostring(obj)
  3. if _G.debug and _G.debug.traceback then
  4. -- level 2 to skip _hx_handle_error
  5. message = _G.debug.traceback(message, 2)
  6. end
  7. return setmetatable({}, { __tostring = function() return message end })
  8. end