mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-10-28 11:19:31 +01:00
better error tracebacks
This commit is contained in:
parent
5381c31abb
commit
d006a91eaa
@ -13,7 +13,7 @@
|
|||||||
-- Metatable for tests
|
-- Metatable for tests
|
||||||
local metatable = {
|
local metatable = {
|
||||||
__call = function(self,name, ...)
|
__call = function(self,name, ...)
|
||||||
return pcall(self.func, name, ...)
|
return xpcall(self.func, debug.traceback, name, ...)
|
||||||
end,
|
end,
|
||||||
help = function(self)
|
help = function(self)
|
||||||
return "Params: " .. self.params .. "\n" .. self.description
|
return "Params: " .. self.params .. "\n" .. self.description
|
||||||
|
Loading…
Reference in New Issue
Block a user