libs/uvl: convert luci.uvl.validation to new luci.uvl.error api
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Mar 2010 22:39:48 +0000 (22:39 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Mar 2010 22:39:48 +0000 (22:39 +0000)
libs/uvl/luasrc/uvl/validation.lua

index 47eed6b1cd84e2cfe3d9a107a168a8b9a582231a..25ac6dcaefd03fe06de61676afc4311ef42bd91f 100644 (file)
@@ -17,7 +17,7 @@ $Id$
 local os = require "os"
 local fs = require "nixio.fs"
 local sys = require "luci.sys"
-local ERR = require "luci.uvl.errors"
+local ERR = require "luci.uvl.errors".error
 
 local ipairs, unpack, type, tostring = ipairs, unpack, type, tostring
 
@@ -63,7 +63,7 @@ function check( self, object )
                        end
 
                        if not ok then
-                               return false, ERR.SME_ERRVAL(object, {tostring(val), err})
+                               return false, ERR('SME_ERRVAL', object, {tostring(val), err})
                        end
                end
        end