Changeset 5870
- Timestamp:
- 03/18/10 23:37:41 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
luci/branches/luci-0.9/libs/uvl/luasrc/uvl/dependencies.lua
r3701 r5870 16 16 17 17 local uvl = require "luci.uvl" 18 local ERR = require "luci.uvl.errors" 18 local ERR = require "luci.uvl.errors".error 19 19 local util = require "luci.util" 20 20 local table = require "table" … … 68 68 function check( self, object, nodeps ) 69 69 70 local derr = ERR .DEPENDENCY(object)70 local derr = ERR('DEPENDENCY', object) 71 71 72 72 if not self.depseen[object:cid()] then 73 73 self.depseen[object:cid()] = true 74 74 else 75 return false, derr:child(ERR .DEP_RECURSIVE(object))75 return false, derr:child(ERR('DEP_RECURSIVE', object)) 76 76 end 77 77 … … 87 87 88 88 if not ref then 89 return false, derr:child(ERR .SME_BADDEP(object,k))89 return false, derr:child(ERR('SME_BADDEP',object,k)) 90 90 end 91 91 … … 103 103 derr:child( 104 104 type(v) == "boolean" 105 and ERR .DEP_NOVALUE(option, depstr)106 or ERR .DEP_NOTEQUAL(option, {depstr, v})105 and ERR('DEP_NOVALUE', option, depstr) 106 or ERR('DEP_NOTEQUAL', option, {depstr, v}) 107 107 ) 108 108 … … 113 113 114 114 local depstr = _serialize_dependency( dep, v ) 115 derr:child(ERR .DEP_NOTVALID(option, depstr):child(err))115 derr:child(ERR('DEP_NOTVALID', option, depstr):child(err)) 116 116 117 117 break … … 140 140 local valid = false 141 141 local enum = object:enum() 142 local eerr = ERR .DEP_BADENUM(enum)142 local eerr = ERR('DEP_BADENUM', enum) 143 143 144 144 for _, dep in ipairs(enum:scheme('enum_depends')[object:value()]) do … … 149 149 150 150 if not ref then 151 return false, derr:child(eerr:child(ERR .SME_BADDEP(enum,k)))151 return false, derr:child(eerr:child(ERR('SME_BADDEP',enum,k))) 152 152 end 153 153 … … 165 165 eerr:child( 166 166 type(v) == "boolean" 167 and ERR .DEP_NOVALUE(option, depstr)168 or ERR .DEP_NOTEQUAL(option, {depstr, v})167 and ERR('DEP_NOVALUE', option, depstr) 168 or ERR('DEP_NOTEQUAL', option, {depstr, v}) 169 169 ) 170 170 … … 175 175 176 176 local depstr = _serialize_dependency( dep, v ) 177 eerr:child(ERR .DEP_NOTVALID(option, depstr):child(err))177 eerr:child(ERR('DEP_NOTVALID', option, depstr):child(err)) 178 178 179 179 break
