function util.tableDesc.ToNameAndDesc(descOrName)
if type(descOrName) == "string" then
return descOrName, nil
elseif type(descOrName) == "table" then
if descOrName.type then
util.tableDesc.CondAbort(type(descOrName.type) ~= "string",
"'type' entry in table has to be of type 'string'")
return descOrName.type, descOrName
elseif descOrName.name then
util.tableDesc.CondAbort(type(descOrName.name) ~= "string",
"'name' entry in table has to be of type 'string'")
return descOrName.name, descOrName
else
print(
"Either 'type' or 'name' have to be specified in a descriptor-table")
exit()
end
end
util.tableDesc.
CondAbort(true, "Invalid
name or descriptor specified!")
end
location name
Definition: checkpoint_util.lua:128
function util balancer CondAbort(condition, message)