1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Hadrons: VM exception for object type (solves infinite loop in scheduler)

This commit is contained in:
Antonin Portelli 2018-08-06 12:11:00 +01:00
parent 2962123cba
commit d2650e89bd
3 changed files with 3 additions and 1 deletions

View File

@ -288,7 +288,7 @@ T * Environment::getDerivedObject(const unsigned int address) const
}
else
{
HADRONS_ERROR_REF(ObjectDefinition, "object with address " +
HADRONS_ERROR_REF(ObjectType, "object with address " +
std::to_string(address) +
" does not have type '" + typeName(&typeid(B)) +
"' (has type '" + getObjectType(address) + "')", address);

View File

@ -69,6 +69,7 @@ CTOR_EXC(System, Runtime("system error: " + msg, loc))
// virtual machine errors
CTOR_EXC_REF(ObjectDefinition, RuntimeRef("object definition error: " + msg, loc, address));
CTOR_EXC_REF(ObjectType, RuntimeRef("object type error: " + msg, loc, address));
// abort functions
void Grid::Hadrons::Exceptions::abort(const std::exception& e)

View File

@ -118,6 +118,7 @@ namespace Exceptions
};
DECL_EXC_REF(ObjectDefinition, RuntimeRef);
DECL_EXC_REF(ObjectType, RuntimeRef);
// abort functions
void abort(const std::exception& e);