From 4e15641c240e28d60558a4b9e0d4738d5671412d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 27 Aug 2008 16:56:38 +0000 Subject: [PATCH] * luci/libs: uvl: actually create error constants in luci.uvl.error --- libs/uvl/luasrc/uvl/errors.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/uvl/luasrc/uvl/errors.lua b/libs/uvl/luasrc/uvl/errors.lua index e29de40024..cf7d287dbf 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 -- 2.30.2