mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
feat: pause on exception caused by 'error' function call
This commit is contained in:
parent
ddc56b46ce
commit
972181022a
2 changed files with 14 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ local current_func_stack_size
|
|||
local _debug_getinfo = debug.getinfo
|
||||
local _debug_getlocal = debug.getlocal
|
||||
local __pause = debug.pause
|
||||
local __error = error
|
||||
|
||||
-- 'return' hook not called for some functions
|
||||
-- todo: speedup
|
||||
|
|
@ -120,6 +121,11 @@ function debug.remove_breakpoint(source, line)
|
|||
bps[source] = nil
|
||||
end
|
||||
|
||||
function error(message, level)
|
||||
__pause("paused on exception: " .. message)
|
||||
__error(message, level)
|
||||
end
|
||||
|
||||
-- Lua has no parallelizm, also _set_data does not call any lua functions so
|
||||
-- may be reused one global ffi buffer per lua_State
|
||||
local canvas_ffi_buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue