* luci/libs: uvl: actually create error constants in luci.uvl.error

This commit is contained in:
Jo-Philipp Wich 2008-08-27 16:56:38 +00:00
parent aa94931fa0
commit 4e15641c24

View file

@ -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