better error tracebacks

This commit is contained in:
VorTechnix 2024-10-14 10:32:11 -07:00
parent 5381c31abb
commit d006a91eaa
No known key found for this signature in database
GPG key ID: 091E91A69545D5BA

View file

@ -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