Skip to content

Commit

Permalink
Report bad key with Unknown Error Message
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Nov 10, 2021
1 parent bee8eaa commit e110d7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/MasterControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,10 @@ local function l_generateMsg(kind, label, ...)
if (argA.n == 1 and type(argA[1]) == "table") then
local t = argA[1]
local key = t.msg
local msg = i18n(key, t) or "Unknown Error Message"
local msg = i18n(key, t)
if (not msg) then
msg = "Unknown Error Message with unknown key: \"".. key .. "\""
end
msg = hook.apply("errWarnMsgHook", kind, key, msg, t) or msg
sA[#sA+1] = buildMsg(twidth, label, msg)
else
Expand Down
2 changes: 1 addition & 1 deletion src/lmod.in.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ function main()
dbg.print{"Lmod Version: ",Version.name(),"\n"}
dbg.print{"package.path: ",package.path,"\n"}
dbg.print{"package.cpath: ",package.cpath,"\n"}
dbg.print{"lmodPath: ", lmodPath,"\n"}
dbg.print{"lmodPath: ", cosmic:value("LMOD_PACKAGE_PATH"),"\n"}
end
-- dumpversion and quit if requested.

Expand Down
2 changes: 0 additions & 2 deletions src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ function initialize_lmod()
end

require("SitePackage")


end


Expand Down

0 comments on commit e110d7a

Please sign in to comment.