mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Display stacktrace with Message:CatchException
This commit is contained in:
parent
6a016ed0b9
commit
78b2812593
@ -35,8 +35,10 @@ end
|
||||
---@param id string
|
||||
---@param func function
|
||||
function Message:CatchException(id, func)
|
||||
local ok, err = pcall(func)
|
||||
local ok, err = xpcall(func, debug.traceback)
|
||||
if not ok then
|
||||
|
||||
print(string.format("An exception happened in %s: %s", id, err))
|
||||
self:ShowRuntimeError(id, string.format("An exception happened in %s", id), err)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user