refactor: throw errors in more lua way, i think

This commit is contained in:
Smirnov Oleksandr 2023-08-10 11:17:19 +03:00
parent 640a36a7f2
commit e49ee67ecc
3 changed files with 4 additions and 8 deletions

View file

@ -8,8 +8,7 @@ function iferr.iferr()
local data = vim.fn.systemlist((c.iferr .. " -pos " .. boff), vim.fn.bufnr "%")
if vim.v.shell_error ~= 0 then
vim.notify("iferr failed: " .. data, vim.log.levels.ERROR)
return
error("iferr failed: " .. data, vim.log.levels.ERROR)
end
vim.fn.append(pos, data)