add advanced lua errors handler & fix hud script source path in traceback

This commit is contained in:
MihailRis
2024-11-19 07:26:28 +03:00
parent 2412699b89
commit 66be215101
5 changed files with 35 additions and 7 deletions
+7
View File
@@ -307,3 +307,10 @@ function __scripts_cleanup()
end
end
end
function __vc__error(msg, frame)
if events then
events.emit("core:error", msg, debug.get_traceback(1))
end
return debug.traceback(msg, frame)
end