more info in error

This commit is contained in:
p.kosyh 2011-07-28 14:51:43 +00:00
parent fc0df23c7d
commit 42ebed40d1
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ function list_check(self, name) -- force using of objects, instead refs
for i,v,ii in opairs(self) do
local o = stead.ref(v);
if not isObject(o) then
error ("No object: "..tostring(v))
error ("No object: "..name.."["..tostring(ii).."]".." ("..tostring(type(v))..")")
return false
end
if (v.auto_allocated and not stead.ref(v.key_name)) -- renew

View file

@ -581,7 +581,7 @@ function list_check(self, name)
for i,v,ii in opairs(self) do
local o = stead.ref(v);
if not o then -- isObject(o) then -- compat
error ("No object: "..tostring(v))
error ("No object: "..name.."["..tostring(ii).."]".." ("..tostring(type(v))..")")
return false
end
if stead.deref(v) then