Skip to content

Commit

Permalink
refactor(async): log errors that occur inside a.scope blocks (chipsal…
Browse files Browse the repository at this point in the history
…liance#735)

These are otherwise completely silenced.
  • Loading branch information
williamboman authored May 29, 2022
1 parent 6815080 commit 63cde74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/nvim-lsp-installer/core/async/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ end

exports.scope = function(suspend_fn)
return function(...)
return new_execution_context(suspend_fn, function() end, ...)
return new_execution_context(suspend_fn, function(success, err)
if not success then
error(err, 0)
end
end, ...)
end
end

Expand Down

0 comments on commit 63cde74

Please sign in to comment.