added extra debug level to attempted object registration that

exits with fatal error to help detection/debugging
This commit is contained in:
andy
2009-06-19 12:56:38 +01:00
parent 81e77b61d7
commit 6192d45253

View File

@ -137,6 +137,16 @@ bool Foam::regIOobject::checkIn()
// checkin on defaultRegion is allowed to fail, since subsetted meshes // checkin on defaultRegion is allowed to fail, since subsetted meshes
// are created with the same name as their originating mesh // are created with the same name as their originating mesh
if (!registered_ && debug && name() != polyMesh::defaultRegion) if (!registered_ && debug && name() != polyMesh::defaultRegion)
{
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"
<< abort(FatalError);
}
else
{ {
WarningIn("regIOobject::checkIn()") WarningIn("regIOobject::checkIn()")
<< "failed to register object " << objectPath() << "failed to register object " << objectPath()
@ -144,6 +154,7 @@ bool Foam::regIOobject::checkIn()
<< endl; << endl;
} }
} }
}
return registered_; return registered_;
} }