Skip to content
Snippets Groups Projects
Verified Commit e1353dc2 authored by Petr Špaček's avatar Petr Špaček Committed by Tomas Krizek
Browse files

tests: verbose stack traces from config tests

parent dc8ee76a
Branches
Tags
1 merge request!1107Renumber module fix
......@@ -2,10 +2,9 @@
local M = {}
function M.test(f, ...)
local res, exception = pcall(f, ...)
local res, exception = xpcall(f, debug.traceback, ...)
if not res then
local trace = debug.getinfo(2)
io.stderr:write(string.format('%s:%d %s\n', trace.source, trace.currentline, exception))
io.stderr:write(string.format('%s\n', exception))
os.exit(2)
end
return res
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment