From 6192d4525326318bfb83ed38f41d3b4964f6bdbd Mon Sep 17 00:00:00 2001 From: andy <a.heather@opencfd.co.uk> Date: Fri, 19 Jun 2009 12:56:38 +0100 Subject: [PATCH] added extra debug level to attempted object registration that exits with fatal error to help detection/debugging --- src/OpenFOAM/db/regIOobject/regIOobject.C | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index a5a5e8e1e3d..28ffbca36e1 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -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; + } } } -- GitLab