style: cleanup & annotations

This commit is contained in:
Folke Lemaitre 2022-11-28 07:36:32 +01:00
parent 02f5528aa3
commit 9179c0a14d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 42 additions and 38 deletions

View file

@ -52,11 +52,11 @@ function M.try(fn, msg)
end
level = level + 1
end
msg = msg .. "\n\n" .. err
if #trace > 0 then
msg = msg .. "\n\n# stacktrace:\n" .. table.concat(trace, "\n")
end
vim.schedule(function()
msg = msg .. "\n\n" .. err
if #trace > 0 then
msg = msg .. "\n\n# stacktrace:\n" .. table.concat(trace, "\n")
end
M.error(msg)
end)
return err