]> git.e2factory.org Git - e2factory.git/commitdiff
err: provide a traceback if assert hits
authorTobias Ulmer <tu@emlix.com>
Wed, 5 Oct 2016 16:11:35 +0000 (18:11 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/err.lua

index 6b793e3617f07996d00231930c9b4f58cf2b06d0..8738b6d8ecb851919942c75cd3e18a686db55afa 100644 (file)
@@ -33,7 +33,7 @@ local e2lib = require("e2lib")
 local strict = require("strict")
 
 local function assert_err(e)
-    assert(type(e) == "table", "No error table supplied")
+    assert(type(e) == "table", "No error table supplied: "..debug.traceback())
     assert(type(e.count) == "number", "Error count is not a number")
     assert(type(e.msg) == "table", "Error message table of wrong type")
     return true