refactor: throw errors in more lua way, i think
This commit is contained in:
parent
640a36a7f2
commit
e49ee67ecc
3 changed files with 4 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue