From 63cde74a9449c17ab4b9a93ce84b34f1cfd530e9 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 30 May 2022 01:49:38 +0200 Subject: [PATCH] refactor(async): log errors that occur inside a.scope blocks (#735) These are otherwise completely silenced. --- lua/nvim-lsp-installer/core/async/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/nvim-lsp-installer/core/async/init.lua b/lua/nvim-lsp-installer/core/async/init.lua index 794a9b35c0..5c82e64a07 100644 --- a/lua/nvim-lsp-installer/core/async/init.lua +++ b/lua/nvim-lsp-installer/core/async/init.lua @@ -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