1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01: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 else
{ {
HADRONS_ERROR_REF(ObjectDefinition, "object with address " + HADRONS_ERROR_REF(ObjectType, "object with address " +
std::to_string(address) + std::to_string(address) +
" does not have type '" + typeName(&typeid(B)) + " does not have type '" + typeName(&typeid(B)) +
"' (has type '" + getObjectType(address) + "')", address); "' (has type '" + getObjectType(address) + "')", address);

View File

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