Skip to content

Commit

Permalink
feat(log): include error messages reported in UI (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored May 21, 2024
1 parent e6c2080 commit 0a85746
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/rocks/operations/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ operations.sync = function(user_rocks, on_complete)
local error_handles = {}
---@param message string
local function report_error(message)
log.error(("SYNC ERROR: %s"):format(message))
table.insert(
error_handles,
progress.handle.create({
Expand Down Expand Up @@ -356,6 +357,7 @@ operations.update = function(on_complete)
local error_handles = {}
---@param message string
local function report_error(message)
log.error(("UPDATE ERROR: %s"):format(message))
table.insert(
error_handles,
progress.handle.create({
Expand Down Expand Up @@ -501,6 +503,7 @@ operations.add = function(arg_list, callback)
lsp_client = { name = constants.ROCKS_NVIM },
})
local function report_error(message)
log.error(("INSTALL ERROR: %s"):format(message))
progress_handle:report({
title = "Error",
message = message,
Expand Down

0 comments on commit 0a85746

Please sign in to comment.