util: add traceback function that i stole

https://discord.com/channels/805969743466332191/827848307480461313/1120318388540022794

it was in a fucking shitpost channel
thanks again @dragekk this is probably the fifth thing i've stolen from
you
This commit is contained in:
NullBite 2023-06-25 01:32:31 -04:00
parent 75c94df180
commit 8a1d772bb4
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -204,4 +204,8 @@ local function recurseModelGroup(group)
end end
util.recurseModelGroup=recurseModelGroup util.recurseModelGroup=recurseModelGroup
function util.traceback()
return ({pcall(function() error("", 4) end)})[2]:match("stack traceback:.+$")
end
return util return util