diff options
-rw-r--r-- | libs/uvl/luasrc/uvl/errors.lua | 4 |
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 |