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 cc99b65d77
commit 5e6a7ea282
678 changed files with 3357 additions and 8219 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,10 +63,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
if (!IOobjectConstructorTablePtr_)
{
FatalErrorIn
(
"dynamicFvMesh::New(const IOobject&)"
) << "dynamicFvMesh table is empty"
FatalErrorInFunction
<< "dynamicFvMesh table is empty"
<< exit(FatalError);
}
@ -75,10 +73,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
if (cstrIter == IOobjectConstructorTablePtr_->end())
{
FatalErrorIn
(
"dynamicFvMesh::New(const IOobject&)"
) << "Unknown dynamicFvMesh type "
FatalErrorInFunction
<< "Unknown dynamicFvMesh type "
<< dynamicFvMeshTypeName << nl << nl
<< "Valid dynamicFvMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc()

View File

@ -241,7 +241,7 @@ Foam::dynamicRefineFvMesh::refine
if (oldFaceI >= nInternalFaces())
{
FatalErrorIn("dynamicRefineFvMesh::refine(const labelList&)")
FatalErrorInFunction
<< "New internal face:" << faceI
<< " fc:" << faceCentres()[faceI]
<< " originates from boundary oldFace:" << oldFaceI
@ -294,10 +294,8 @@ Foam::dynamicRefineFvMesh::refine
if (masterFaceI < 0)
{
FatalErrorIn
(
"dynamicRefineFvMesh::refine(const labelList&)"
) << "Problem: should not have removed faces"
FatalErrorInFunction
<< "Problem: should not have removed faces"
<< " when refining."
<< nl << "face:" << faceI << abort(FatalError);
}
@ -320,7 +318,7 @@ Foam::dynamicRefineFvMesh::refine
{
if (!correctFluxes_.found(iter.key()))
{
WarningIn("dynamicRefineFvMesh::refine(const labelList&)")
WarningInFunction
<< "Cannot find surfaceScalarField " << iter.key()
<< " in user-provided flux mapping table "
<< correctFluxes_ << endl
@ -549,7 +547,7 @@ Foam::dynamicRefineFvMesh::unrefine
{
if (!correctFluxes_.found(iter.key()))
{
WarningIn("dynamicRefineFvMesh::refine(const labelList&)")
WarningInFunction
<< "Cannot find surfaceScalarField " << iter.key()
<< " in user-provided flux mapping table "
<< correctFluxes_ << endl
@ -1227,7 +1225,7 @@ bool Foam::dynamicRefineFvMesh::update()
}
else if (refineInterval < 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal refineInterval " << refineInterval << nl
<< "The refineInterval setting in the dynamicMeshDict should"
<< " be >= 1." << nl
@ -1246,7 +1244,7 @@ bool Foam::dynamicRefineFvMesh::update()
if (maxCells <= 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal maximum number of cells " << maxCells << nl
<< "The maxCells setting in the dynamicMeshDict should"
<< " be > 0." << nl
@ -1257,7 +1255,7 @@ bool Foam::dynamicRefineFvMesh::update()
if (maxRefinement <= 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal maximum refinement level " << maxRefinement << nl
<< "The maxCells setting in the dynamicMeshDict should"
<< " be > 0." << nl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,10 +81,8 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
{
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh"
"(const IOobject&)",
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
@ -106,10 +104,8 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
if (zoneIDs_[zoneI] == -1)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"multiSolidBodyMotionFvMesh::"
"multiSolidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
) << "Cannot find cellZone named " << iter().keyword()
<< ". Valid zones are " << cellZones().names()
@ -207,7 +203,7 @@ bool Foam::multiSolidBodyMotionFvMesh::update()
{
hasWarned = true;
WarningIn("multiSolidBodyMotionFvMesh::update()")
WarningInFunction
<< "Did not find volVectorField U."
<< " Not updating U boundary conditions." << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,14 +42,8 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidBodyMotionFunction::New"
"("
" const dictionary& SBMFCoeffs,"
" const Time& runTime"
")"
) << "Unknown solidBodyMotionFunction type "
FatalErrorInFunction
<< "Unknown solidBodyMotionFunction type "
<< motionType << nl << nl
<< "Valid solidBodyMotionFunctions are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -78,10 +78,8 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
if (t < times_[0])
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t
FatalErrorInFunction
<< "current time (" << t
<< ") is less than the minimum in the data table ("
<< times_[0] << ')'
<< exit(FatalError);
@ -89,10 +87,8 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
if (t > times_.last())
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t
FatalErrorInFunction
<< "current time (" << t
<< ") is greater than the maximum in the data table ("
<< times_.last() << ')'
<< exit(FatalError);
@ -156,11 +152,8 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
}
else
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::read"
"(const dictionary&)"
) << "Cannot open time data file " << timeDataFileName_
FatalErrorInFunction
<< "Cannot open time data file " << timeDataFileName_
<< exit(FatalError);
}
}

View File

@ -81,11 +81,8 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
{
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
FatalIOErrorInFunction(dynamicMeshCoeffs_)
<< "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
<< " but the current mesh has " << nPoints()
<< exit(FatalIOError);
@ -99,11 +96,7 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if ((cellZoneName != "none") && (cellSetName != "none"))
{
FatalIOErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
)
FatalIOErrorInFunction(dynamicMeshCoeffs_)
<< "Either cellZone OR cellSet can be supplied, but not both. "
<< "If neither is supplied, all cells will be included"
<< exit(FatalIOError);
@ -120,10 +113,8 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if (zoneID == -1)
{
FatalErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)"
) << "Unable to find cellZone " << cellZoneName
FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName
<< ". Valid cellZones are:"
<< cellZones().names()
<< exit(FatalError);
@ -234,7 +225,7 @@ bool Foam::solidBodyMotionFvMesh::update()
{
hasWarned = true;
WarningIn("solidBodyMotionFvMesh::update()")
WarningInFunction
<< "Did not find volVectorField " << UName_
<< " Not updating " << UName_ << "boundary conditions."
<< endl;