Content deleted Content added
better name for parseConfigVal |
add error message for action objects with no code passed, and set the level for errors using Message:raiseError to zero |
||
Line 80:
end
function Message:raiseError(msg, help
local errorText
if help then
Line 87:
errorText = self:message('error-message-nohelp', msg)
end
end▼
▲ error(errorText, level)
end
Line 266 ⟶ 262:
local Action = setmetatable({}, Row)
Action.__index = Action
function Action.new(data)
local obj = Row.new(data)
setmetatable(obj, Action)
Line 284 ⟶ 270:
-- Set the ID
if not data.code then
local codeParam = self.cfg.actionParamPrefix .. tostring(obj.paramNum)
self:raiseError(
self:message('action-error-no-code', codeParam),
self:message('action-error-no-code-help')
)
▲ end
obj.id = obj.cfg.actions[data.code] and obj.cfg.actions[data.code].id
if not obj.id then
|