Added error message printout to console.
This commit is contained in:
parent
2ff0d96db3
commit
47771a79f9
9
ldt.lua
9
ldt.lua
@ -1278,9 +1278,12 @@ ldb = {
|
||||
return C.endwin()
|
||||
end,
|
||||
guard = function(fn, ...)
|
||||
return xpcall(fn, (function(err_msg)
|
||||
return xpcall(ldb.run_debugger, err_hand, err_msg)
|
||||
end), ...)
|
||||
local handler
|
||||
handler = function(err_msg)
|
||||
xpcall(ldb.run_debugger, err_hand, err_msg)
|
||||
return print(debug.traceback(err_msg, 2))
|
||||
end
|
||||
return xpcall(fn, handler, ...)
|
||||
end,
|
||||
breakpoint = function()
|
||||
return xpcall(ldb.run_debugger, err_hand, "Breakpoint triggered!")
|
||||
|
5
ldt.moon
5
ldt.moon
@ -895,7 +895,10 @@ ldb = {
|
||||
C.endwin!
|
||||
|
||||
guard: (fn, ...)->
|
||||
return xpcall(fn, ((err_msg)-> xpcall(ldb.run_debugger, err_hand, err_msg)), ...)
|
||||
handler = (err_msg)->
|
||||
xpcall(ldb.run_debugger, err_hand, err_msg)
|
||||
print(debug.traceback(err_msg, 2))
|
||||
return xpcall(fn, handler, ...)
|
||||
|
||||
breakpoint: ->
|
||||
return xpcall(ldb.run_debugger, err_hand, "Breakpoint triggered!")
|
||||
|
Loading…
Reference in New Issue
Block a user