summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-27 16:56:38 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-27 16:56:38 +0000
commit4e15641c240e28d60558a4b9e0d4738d5671412d (patch)
tree7f019e2944f7ae7774c315951f8a0575ea596f5d
parentaa94931fa01c63f9644056eed73ea9c6a665b6ca (diff)
* luci/libs: uvl: actually create error constants in luci.uvl.error
-rw-r--r--libs/uvl/luasrc/uvl/errors.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/uvl/luasrc/uvl/errors.lua b/libs/uvl/luasrc/uvl/errors.lua
index e29de4002..cf7d287db 100644
--- a/libs/uvl/luasrc/uvl/errors.lua
+++ b/libs/uvl/luasrc/uvl/errors.lua
@@ -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