Changes
set the proper error level for formatMessage, although it looks like it doesn't work because of the upvalues
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('formatMessage: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 24)
end