Signed-off-by: Tobias Ulmer <tu@emlix.com>
local strict = require("strict")
local function assert_err(e)
- assert(type(e) == "table", "No error table supplied: "..debug.traceback())
+ if type(e) ~= "table" then -- prevent calling debug.traceback() everytime
+ assert(type(e) == "table", "No error table supplied: "..debug.traceback())
+ end
assert(type(e.count) == "number", "Error count is not a number")
assert(type(e.msg) == "table", "Error message table of wrong type")
return true