Skip to content

Commit

Permalink
Add game title and author to ContentDB error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Aug 15, 2022
1 parent aa2fdc6 commit 03b566a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions builtin/mainmenu/dlg_contentstore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ local function download_and_extract(param)
if filename == "" or not core.download_file(param.url, filename) then
core.log("error", "Downloading " .. dump(param.url) .. " failed")
return {
msg = fgettext("Failed to download $1", package.name)
msg = fgettext("Failed to download")
}
end

Expand All @@ -105,7 +105,7 @@ local function download_and_extract(param)
os.remove(filename)
if not tempfolder then
return {
msg = fgettext("Install: Unsupported file type or broken archive"),
msg = fgettext("Failed to extract (unsupported file type or broken archive)"),
}
end

Expand All @@ -124,12 +124,12 @@ local function start_install(package, reason)

local function callback(result)
if result.msg then
gamedata.errormessage = result.msg
gamedata.errormessage = fgettext("Error getting \"$1\": $2", package.title, result.msg)
else
local path, msg = pkgmgr.install_dir(package.type, result.path, package.name, package.path)
core.delete_dir(result.path)
if not path then
gamedata.errormessage = msg
gamedata.errormessage = fgettext("Error installing \"$1\": $2", package.title, msg)
else
core.log("action", "Installed package to " .. path)

Expand Down

0 comments on commit 03b566a

Please sign in to comment.