diff --git a/tests/config/test_utils.lua b/tests/config/test_utils.lua index 15a14520f3704dd1ad1f1a4daa355fe5b6b544c4..5a7f3111b101e358b5f96b6dbcd714553af60fdb 100644 --- a/tests/config/test_utils.lua +++ b/tests/config/test_utils.lua @@ -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