Uses the error logging facility to print a plugins traceback

This commit is contained in:
Simone Mainardi 2021-08-12 09:58:01 +02:00
parent 58a74d3b0c
commit 237a4a3659

View file

@ -808,8 +808,11 @@ local function load_metadata()
if not status then
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Could not load plugins metadata file '%s'", PLUGIN_RELATIVE_PATHS.metadata))
-- Prints the traceback using multiple traceError to make sure it ends up completely as error in logging systems
local tb = debug.traceback()
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("%s", tb))
for s in tb:gmatch("[^\r\n]+") do
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("%s", s))
end
end
end
end