Completed update ...ErrorIn -> ...ErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
This commit is contained in:
Henry Weller
2015-11-11 09:03:39 +00:00
parent dc43311e62
commit c4d5f65a10
678 changed files with 3357 additions and 8219 deletions

View File

@ -39,7 +39,7 @@ Foam::edge Foam::wallBoundedParticle::currentEdge() const
{
if ((meshEdgeStart_ != -1) == (diagEdge_ != -1))
{
FatalErrorIn("wallBoundedParticle::currentEdge() const")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "cannot both be on a mesh edge and a face-diagonal edge."
@ -93,11 +93,8 @@ void Foam::wallBoundedParticle::crossEdgeConnectedFace
}
else
{
FatalErrorIn
(
"wallBoundedParticle::crossEdgeConnectedFace"
"(const edge&)"
) << "Problem :"
FatalErrorInFunction
<< "Problem :"
<< " particle:"
<< info()
<< "face:" << tetFace()
@ -113,11 +110,8 @@ void Foam::wallBoundedParticle::crossEdgeConnectedFace
const edge eNew(f[meshEdgeStart_], f.nextLabel(meshEdgeStart_));
if (eNew != meshEdge)
{
FatalErrorIn
(
"wallBoundedParticle::crossEdgeConnectedFace"
"(const edge&)"
) << "Problem" << abort(FatalError);
FatalErrorInFunction
<< "Problem" << abort(FatalError);
}
}
@ -126,14 +120,14 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
{
if (diagEdge_ == -1)
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "not on a diagonal edge" << abort(FatalError);
}
if (meshEdgeStart_ != -1)
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "meshEdgeStart_:" << meshEdgeStart_ << abort(FatalError);
@ -156,7 +150,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
}
else
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "tetPt:" << tetPt()
@ -268,11 +262,8 @@ bool Foam::wallBoundedParticle::isTriAlongTrack
|| findIndex(triVerts, currentE[1]) == -1
)
{
FatalErrorIn
(
"wallBoundedParticle::isTriAlongTrack"
"(const point&)"
) << "Edge " << currentE << " not on triangle " << triVerts
FatalErrorInFunction
<< "Edge " << currentE << " not on triangle " << triVerts
<< info()
<< abort(FatalError);
}
@ -298,11 +289,8 @@ bool Foam::wallBoundedParticle::isTriAlongTrack
}
}
FatalErrorIn
(
"wallBoundedParticle::isTriAlongTrack"
"(const point&)"
) << "Problem" << abort(FatalError);
FatalErrorInFunction
<< "Problem" << abort(FatalError);
return false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -206,11 +206,8 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
if (mesh_.isInternalFace(tetFace()))
{
FatalErrorIn
(
"wallBoundedParticle::trackToEdge"
"(TrackData&, const vector&)"
) << "Can only track on boundary faces."
FatalErrorInFunction
<< "Can only track on boundary faces."
<< " Face:" << tetFace()
<< " at:" << mesh_.faceCentres()[tetFace()]
<< abort(FatalError);
@ -286,7 +283,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
{
//Note: should not happen since boundary face so owner
//Pout<< "Real edge." << endl;
FatalErrorIn("shold not happend") << info()
FatalErrorInFunction
<< abort(FatalError);
diagEdge_ = -1;
@ -332,7 +329,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
{
//Note: should not happen since boundary face so owner
//Pout<< "Real edge." << endl;
FatalErrorIn("shold not happend") << info()
FatalErrorInFunction
<< abort(FatalError);
diagEdge_ = -1;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -302,7 +302,7 @@ void Foam::wallBoundedStreamLine::track()
}
else
{
FatalErrorIn("wallBoundedStreamLine::execute()")
FatalErrorInFunction
<< "Cannot find field " << fields_[i] << endl
<< "Valid scalar fields are:"
<< mesh.names(volScalarField::typeName) << endl
@ -375,7 +375,7 @@ void Foam::wallBoundedStreamLine::track()
if (UIndex == -1)
{
FatalErrorIn("wallBoundedStreamLine::execute()")
FatalErrorInFunction
<< "Cannot find field to move particles with : " << UName_
<< endl
<< "This field has to be present in the sampled fields "
@ -454,16 +454,8 @@ Foam::wallBoundedStreamLine::wallBoundedStreamLine
else
{
active_ = false;
WarningIn
(
"wallBoundedStreamLine::wallBoundedStreamLine\n"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool "
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< nl << endl;
}
}
@ -492,9 +484,8 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
UName_ = "U";
if (dict.found("U"))
{
IOWarningIn
IOWarningInFunction
(
"wallBoundedStreamLine::read(const dictionary&)",
dict
) << "Using deprecated entry \"U\"."
<< " Please use \"UName\" instead."
@ -505,9 +496,8 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
if (findIndex(fields_, UName_) == -1)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"wallBoundedStreamLine::read(const dictionary&)",
dict
) << "Velocity field for tracking " << UName_
<< " should be present in the list of fields " << fields_
@ -519,7 +509,7 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
dict.lookup("lifeTime") >> lifeTime_;
if (lifeTime_ < 1)
{
FatalErrorIn(":wallBoundedStreamLine::read(const dictionary&)")
FatalErrorInFunction
<< "Illegal value " << lifeTime_ << " for lifeTime"
<< exit(FatalError);
}
@ -584,7 +574,7 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
{
label nFaces = returnReduce(faces.size(), sumOp<label>());
WarningIn("wallBoundedStreamLine::read(const dictionary&)")
WarningInFunction
<< "Found " << nFaces
<<" faces with low quality or negative volume "
<< "decomposition tets. Writing to faceSet " << faces.name()
@ -623,10 +613,8 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
{
if (iter() != 2)
{
FatalErrorIn
(
"wallBoundedStreamLine::read(const dictionary&)"
) << "problem cell:" << cellI
FatalErrorInFunction
<< "problem cell:" << cellI
<< abort(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
{
if (cellI == -1)
{
FatalErrorIn("wallBoundedStreamLineParticle::interpolateFields(..)")
FatalErrorInFunction
<< "Cell:" << cellI << abort(FatalError);
}