Adding a dbg.msgh() function to make it easier to use with lua_pcall() from C.
This commit is contained in:
parent
912d64f548
commit
100874d6ba
|
@ -407,6 +407,14 @@ function dbg.call(f, l)
|
||||||
end))
|
end))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Error message handler that can be used with lua_pcall().
|
||||||
|
function dbg.msgh(...)
|
||||||
|
print(...)
|
||||||
|
dbg(false, 1)
|
||||||
|
|
||||||
|
return ...
|
||||||
|
end
|
||||||
|
|
||||||
-- Detect Lua version.
|
-- Detect Lua version.
|
||||||
if jit then -- LuaJIT
|
if jit then -- LuaJIT
|
||||||
dbg.writeln(COLOR_RED.."debugger.lua: Loaded for "..jit.version..COLOR_RESET)
|
dbg.writeln(COLOR_RED.."debugger.lua: Loaded for "..jit.version..COLOR_RESET)
|
||||||
|
|
Loading…
Reference in New Issue