1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 05:07:05 +01:00

Hadrons: error managed through expections

This commit is contained in:
2017-12-12 14:04:28 +00:00
parent 64161a8743
commit 26d7b829a0
15 changed files with 174 additions and 43 deletions

View File

@ -227,7 +227,7 @@ void Environment::createDerivedObject(const std::string name,
}
else
{
HADRON_ERROR("object '" + name + "' already allocated");
HADRON_ERROR(Definition, "object '" + name + "' already allocated");
}
}
@ -253,20 +253,20 @@ T * Environment::getObject(const unsigned int address) const
}
else
{
HADRON_ERROR("object with address " + std::to_string(address) +
HADRON_ERROR(Definition, "object with address " + std::to_string(address) +
" does not have type '" + typeName(&typeid(T)) +
"' (has type '" + getObjectType(address) + "')");
}
}
else
{
HADRON_ERROR("object with address " + std::to_string(address) +
HADRON_ERROR(Definition, "object with address " + std::to_string(address) +
" is empty");
}
}
else
{
HADRON_ERROR("no object with address " + std::to_string(address));
HADRON_ERROR(Definition, "no object with address " + std::to_string(address));
}
}
@ -292,7 +292,7 @@ bool Environment::isObjectOfType(const unsigned int address) const
}
else
{
HADRON_ERROR("no object with address " + std::to_string(address));
HADRON_ERROR(Definition, "no object with address " + std::to_string(address));
}
}