* luci/libs: uvl: actually create error constants in luci.uvl.error
This commit is contained in:
parent
aa94931fa0
commit
4e15641c24
1 changed files with 3 additions and 1 deletions
|
@ -64,11 +64,13 @@ ERRCODES = {
|
|||
{ 'DEP_BADENUM', 'In dependency check for enum value "%i":\n%c' }
|
||||
}
|
||||
|
||||
-- build error constants
|
||||
-- build error constants and instance constructors
|
||||
for i, v in ipairs(ERRCODES) do
|
||||
luci.uvl.errors[v[1]] = function(...)
|
||||
return error(i, ...)
|
||||
end
|
||||
|
||||
luci.uvl.errors['ERR_'..v[1]] = i
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue