diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-03 22:02:35 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-03 22:02:35 +0000 |
commit | 85461e4226f3e5b3828324a3a4b743dbc88812f2 (patch) | |
tree | 4a2c693c2ab135a34d669ecf9777d53231d8e475 /libs/uvl | |
parent | 727e9878fb00f545c0cd1b0130e789a5764eee3b (diff) |
* luci/libs/uvl: fix error handling of OPT_INVVALUE too
Diffstat (limited to 'libs/uvl')
-rw-r--r-- | libs/uvl/luasrc/uvl.lua | 2 | ||||
-rw-r--r-- | libs/uvl/luasrc/uvl/errors.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua index 007a37dbc..b1d481062 100644 --- a/libs/uvl/luasrc/uvl.lua +++ b/libs/uvl/luasrc/uvl.lua @@ -321,7 +321,7 @@ function UVL._validate_option( self, option, nodeps ) for i, v in ipairs(val) do if not self.datatypes[dt]( v ) then return false, option:error( - ERR.OPT_INVVALUE(option, dt) + ERR.OPT_INVVALUE(option, { v, dt }) ) end end diff --git a/libs/uvl/luasrc/uvl/errors.lua b/libs/uvl/luasrc/uvl/errors.lua index c53a4abe0..aa1d8fb35 100644 --- a/libs/uvl/luasrc/uvl/errors.lua +++ b/libs/uvl/luasrc/uvl/errors.lua @@ -54,7 +54,7 @@ ERRCODES = { { 'OPT_UNKNOWN', 'Option "%i" (%I) not found in scheme' }, { 'OPT_REQUIRED', 'Required option "%i" has no value' }, { 'OPT_BADVALUE', 'Value "%1" of option "%i" is not defined in enum %2' }, - { 'OPT_INVVALUE', 'Value "%v" of given option "%i" does not validate as datatype "%1"' }, + { 'OPT_INVVALUE', 'Value "%1" of given option "%i" does not validate as datatype "%2"' }, { 'OPT_NOTLIST', 'Option "%i" is defined as list but stored as plain value' }, { 'OPT_DATATYPE', 'Option "%i" has unknown datatype "%1"' }, { 'OPT_NOTFOUND', 'Option "%p.%s.%o" not found in config' }, |