Corrected usage for FatalErrorIn(...) - multiple C files

This commit is contained in:
andy
2010-01-22 11:21:42 +00:00
parent 2900792fe6
commit 04c9364f9a
5 changed files with 53 additions and 30 deletions

View File

@ -450,8 +450,17 @@ bool Foam::interactionLists::testPointFaceDistance
// if the algorithm hasn't returned anything by now then something has // if the algorithm hasn't returned anything by now then something has
// gone wrong. // gone wrong.
FatalErrorIn("interactionLists.C") << nl FatalErrorIn
<< "point " << p << " to face " << faceToTest (
"interactionLists::testPointFaceDistance"
"("
"const vector&, "
"const labelList&, "
"const vectorList&, "
"const vector&, "
"const vector&"
") const"
) << "point " << p << " to face " << faceToTest
<< " comparison did not find a nearest point" << " comparison did not find a nearest point"
<< " to be inside or outside face." << " to be inside or outside face."
<< abort(FatalError); << abort(FatalError);

View File

@ -121,8 +121,10 @@ void Foam::referredCellList::buildReferredCellList
} }
else else
{ {
FatalErrorIn ("referredCellList.C") FatalErrorIn
<< nl << "unable to read undecomposed boundary file from " (
"referredCellList::buildReferredCellList(bool)"
) << "unable to read undecomposed boundary file from "
<< "constant/polyMesh" << nl << "constant/polyMesh" << nl
<< abort(FatalError); << abort(FatalError);
} }
@ -333,9 +335,10 @@ void Foam::referredCellList::buildReferredCellList
> interactionLists::transTol > interactionLists::transTol
) )
{ {
FatalErrorIn ("referredCellList.C") FatalErrorIn
<< nl << "Face pairs on patch " (
<< patch.name() "referredCellList::buildReferredCellList(bool)"
) << "Face pairs on patch " << patch.name()
<< ", segment " << patchNames[nUP] << ", segment " << patchNames[nUP]
<< " do not give the same referring " << " do not give the same referring "
<< " transformations to within tolerance of " << " transformations to within tolerance of "
@ -423,9 +426,10 @@ void Foam::referredCellList::buildReferredCellList
> interactionLists::transTol > interactionLists::transTol
) )
{ {
FatalErrorIn ("referredCellList.C") FatalErrorIn
<< nl << "Face pairs on patch " (
<< patch.name() "referredCellList::buildReferredCellList(bool)"
) << "Face pairs on patch " << patch.name()
<< " do not give the same referring " << " do not give the same referring "
<< " transformations to within tolerance of " << " transformations to within tolerance of "
<< interactionLists::transTol << nl << interactionLists::transTol << nl
@ -1022,8 +1026,10 @@ void Foam::referredCellList::buildReferredCellList
{ {
if (faceT == -1) if (faceT == -1)
{ {
FatalErrorIn ("referredCellList.C") FatalErrorIn
<< nl << "faceT == -1 encountered but " (
"referredCellList::buildReferredCellList(bool)"
) << "faceT == -1 encountered but "
<< meshFacesOnThisSegment.size() << meshFacesOnThisSegment.size()
<< " faces found on patch segment." << " faces found on patch segment."
<< abort(FatalError); << abort(FatalError);

View File

@ -81,7 +81,7 @@ void Foam::moleculeCloud::buildConstProps()
if (siteIds[sI] == -1) if (siteIds[sI] == -1)
{ {
FatalErrorIn("moleculeCloud.C") << nl FatalErrorIn("moleculeCloud::buildConstProps()")
<< siteId << " site not found." << siteId << " site not found."
<< nl << abort(FatalError); << nl << abort(FatalError);
} }

View File

@ -101,7 +101,7 @@ Foam::scalar Foam::pairPotential::force(const scalar r) const
if (k < 0) if (k < 0)
{ {
FatalErrorIn("pairPotential.C") << nl FatalErrorIn("pairPotential::force(const scalar) const")
<< "r less than rMin in pair potential " << name_ << nl << "r less than rMin in pair potential " << name_ << nl
<< abort(FatalError); << abort(FatalError);
} }
@ -138,7 +138,7 @@ Foam::scalar Foam::pairPotential::energy(const scalar r) const
if (k < 0) if (k < 0)
{ {
FatalErrorIn("pairPotential.C") << nl FatalErrorIn("pairPotential::energy(const scalar) const")
<< "r less than rMin in pair potential " << name_ << nl << "r less than rMin in pair potential " << name_ << nl
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -40,7 +40,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
if (!moleculePropertiesDict.found(id)) if (!moleculePropertiesDict.found(id))
{ {
FatalErrorIn("potential.C") << nl FatalErrorIn("potential::setSiteIdList(const IOdictionary&)")
<< id << " molecule subDict not found" << id << " molecule subDict not found"
<< nl << abort(FatalError); << nl << abort(FatalError);
} }
@ -67,7 +67,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
if (findIndex(siteIdNames, siteId) == -1) if (findIndex(siteIdNames, siteId) == -1)
{ {
FatalErrorIn("potential.C") << nl FatalErrorIn("potential::setSiteIdList(const IOdictionary&)")
<< siteId << " in pairPotentialSiteIds is not in siteIds: " << siteId << " in pairPotentialSiteIds is not in siteIds: "
<< siteIdNames << nl << abort(FatalError); << siteIdNames << nl << abort(FatalError);
} }
@ -174,7 +174,7 @@ void Foam::potential::potential::readPotentialDict()
if (removalOrder_[rO] == -1) if (removalOrder_[rO] == -1)
{ {
FatalErrorIn("potentials.C") << nl FatalErrorIn("potential::readPotentialDict()")
<< "removalOrder entry: " << remOrd[rO] << "removalOrder entry: " << remOrd[rO]
<< " not found in idList." << " not found in idList."
<< nl << abort(FatalError); << nl << abort(FatalError);
@ -187,7 +187,7 @@ void Foam::potential::potential::readPotentialDict()
if (!potentialDict.found("pair")) if (!potentialDict.found("pair"))
{ {
FatalErrorIn("potentials.C") << nl FatalErrorIn("potential::readPotentialDict()")
<< "pair potential specification subDict not found" << "pair potential specification subDict not found"
<< abort(FatalError); << abort(FatalError);
} }
@ -208,7 +208,7 @@ void Foam::potential::potential::readPotentialDict()
{ {
if (!potentialDict.found("tether")) if (!potentialDict.found("tether"))
{ {
FatalErrorIn("potential.C") << nl FatalErrorIn("potential::readPotentialDict()")
<< "tether potential specification subDict not found" << "tether potential specification subDict not found"
<< abort(FatalError); << abort(FatalError);
} }
@ -289,11 +289,15 @@ void Foam::potential::potential::readMdInitialiseDict
if (!moleculePropertiesDict.found(id)) if (!moleculePropertiesDict.found(id))
{ {
FatalErrorIn("potential.C") << nl FatalErrorIn
<< "Molecule type " (
<< id "potential::readMdInitialiseDict"
<< " not found in moleculeProperties dictionary." "("
<< nl "const IOdictionary&, "
"IOdictionary&"
")"
) << "Molecule type " << id
<< " not found in moleculeProperties dictionary." << nl
<< abort(FatalError); << abort(FatalError);
} }
@ -340,11 +344,15 @@ void Foam::potential::potential::readMdInitialiseDict
} }
else else
{ {
FatalErrorIn("potential.C") << nl FatalErrorIn
<< "Tether id " (
<< tetherSiteId "potential::readMdInitialiseDict"
<< " not found as a site of any molecule in zone." "("
<< nl "const IOdictionary&, "
"IOdictionary&"
")"
) << "Tether id " << tetherSiteId
<< " not found as a site of any molecule in zone." << nl
<< abort(FatalError); << abort(FatalError);
} }
} }