diff options
| author | William Boman <william@redwill.se> | 2022-05-30 01:49:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-30 01:49:38 +0200 |
| commit | 63cde74a9449c17ab4b9a93ce84b34f1cfd530e9 (patch) | |
| tree | 80a25bc9f8215e644d21e4a71ed2bb15cce5bbb9 /lua | |
| parent | fix(log): fix evaluation of has() result (diff) | |
| download | mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar.gz mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar.bz2 mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar.lz mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar.xz mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.tar.zst mason-63cde74a9449c17ab4b9a93ce84b34f1cfd530e9.zip | |
refactor(async): log errors that occur inside a.scope blocks (#735)
These are otherwise completely silenced.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/core/async/init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/core/async/init.lua b/lua/nvim-lsp-installer/core/async/init.lua index 794a9b35..5c82e64a 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 |
