mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added extra debug level to attempted object registration that
exits with fatal error to help detection/debugging
This commit is contained in:
@ -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_;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user