Commit 6192d452 authored by Andrew Heather's avatar Andrew Heather
Browse files

added extra debug level to attempted object registration that

exits with fatal error to help detection/debugging
parent 81e77b61
......@@ -138,10 +138,21 @@ bool Foam::regIOobject::checkIn()
// are created with the same name as their originating mesh
if (!registered_ && debug && name() != polyMesh::defaultRegion)
{
WarningIn("regIOobject::checkIn()")
<< "failed to register object " << objectPath()
if (debug == 2)
{
// Temporary: for ease of finding where checkin originates from.
FatalErrorIn("regIOobject::checkIn()")
<< "failed to register object " << objectPath()
<< " the name already exists in the objectRegistry"
<< endl;
<< abort(FatalError);
}
else
{
WarningIn("regIOobject::checkIn()")
<< "failed to register object " << objectPath()
<< " the name already exists in the objectRegistry"
<< endl;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment