Skip to content

Commit

Permalink
fix: added debugging info for #220
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 13, 2022
1 parent b4ac173 commit 6de461b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/noice/util/call.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ end
---@param opts? CallOptions
---@return F
function M.protect(fn, opts)
if not fn then
local trace = debug.traceback()
Util.panic("nil passed to noice.util.call.protect. This should not happen.\n%s", trace)
end
local self = setmetatable({}, M)
self._opts = vim.tbl_deep_extend("force", defaults, opts or {})
self._fn = fn
Expand Down

0 comments on commit 6de461b

Please sign in to comment.