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

@ -85,7 +85,7 @@ void Foam::fieldValues::cellSource::setCellZoneCells()
if (zoneId < 0)
{
FatalErrorIn("cellSource::cellSource::setCellZoneCells()")
FatalErrorInFunction
<< "Unknown cell zone name: " << sourceName_
<< ". Valid cell zones are: " << mesh().cellZones().names()
<< nl << exit(FatalError);
@ -105,7 +105,7 @@ void Foam::fieldValues::cellSource::setCellZoneCells()
default:
{
FatalErrorIn("cellSource::setCellZoneCells()")
FatalErrorInFunction
<< "Unknown source type. Valid source types are:"
<< sourceTypeNames_ << nl << exit(FatalError);
}
@ -132,10 +132,8 @@ void Foam::fieldValues::cellSource::initialise(const dictionary& dict)
if (nCells_ == 0)
{
WarningIn
(
"Foam::fieldValues::cellSource::initialise(const dictionary&)"
) << type() << " " << name_ << ": "
WarningInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Source has no cells - deactivating" << endl;
@ -262,7 +260,7 @@ void Foam::fieldValues::cellSource::write()
if (!processed)
{
WarningIn("void Foam::fieldValues::cellSource::write()")
WarningInFunction
<< "Requested field " << fieldName
<< " not found in database and not processed"
<< endl;

View File

@ -58,15 +58,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::setFieldValues
if (mustGet)
{
FatalErrorIn
(
"Foam::tmp<Foam::Field<Type> > "
"Foam::fieldValues::cellSource::setFieldValues"
"("
"const word&, "
"const bool"
") const"
) << "Field " << fieldName << " not found in database"
FatalErrorInFunction
<< "Field " << fieldName << " not found in database"
<< abort(FatalError);
}

View File

@ -90,7 +90,7 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces()
if (zoneId < 0)
{
FatalErrorIn("faceSource::faceSource::setFaceZoneFaces()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Unknown face zone name: " << sourceName_
@ -175,7 +175,7 @@ void Foam::fieldValues::faceSource::setPatchFaces()
if (patchId < 0)
{
FatalErrorIn("faceSource::constructFaceAddressing()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Unknown patch name: " << sourceName_
@ -421,7 +421,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
}
default:
{
FatalErrorIn("faceSource::initialise()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
<< nl << " Unknown source type. Valid source types are:"
@ -431,10 +431,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
if (nFaces_ == 0)
{
WarningIn
(
"Foam::fieldValues::faceSource::initialise(const dictionary&)"
)
WarningInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Source has no faces - deactivating" << endl;
@ -462,14 +459,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
if (source_ == stSampledSurface)
{
FatalIOErrorIn
(
"void Foam::fieldValues::faceSource::initialise"
"("
"const dictionary&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< "Cannot use weightField for a sampledSurface"
<< exit(FatalIOError);
}
@ -485,14 +475,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
}
else
{
FatalIOErrorIn
(
"void Foam::fieldValues::faceSource::initialise"
"("
"const dictionary&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< "Either weightField or orientedWeightField can be supplied, "
<< "but not both"
<< exit(FatalIOError);
@ -737,7 +720,7 @@ void Foam::fieldValues::faceSource::write()
if (!ok)
{
WarningIn("void Foam::fieldValues::faceSource::write()")
WarningInFunction
<< "Requested field " << fieldName
<< " not found in database and not processed"
<< endl;

View File

@ -110,16 +110,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::getFieldValues
if (mustGet)
{
FatalErrorIn
(
"Foam::tmp<Foam::Field<Type> > "
"Foam::fieldValues::faceSource::getFieldValues"
"("
"const word&, "
"const bool, "
"const bool"
") const"
) << "Field " << fieldName << " not found in database"
FatalErrorInFunction
<< "Field " << fieldName << " not found in database"
<< abort(FatalError);
}
@ -150,16 +142,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
}
case opSumDirection:
{
FatalErrorIn
(
"template<class Type>"
"Type Foam::fieldValues::faceSource::processSameTypeValues"
"("
"const Field<Type>&, "
"const vectorField&, "
"const scalarField&"
") const"
)
FatalErrorInFunction
<< "Operation " << operationTypeNames_[operation_]
<< " not available for values of type "
<< pTraits<Type>::typeName
@ -170,16 +153,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
}
case opSumDirectionBalance:
{
FatalErrorIn
(
"template<class Type>"
"Type Foam::fieldValues::faceSource::processSameTypeValues"
"("
"const Field<Type>&, "
"const vectorField&, "
"const scalarField&"
") const"
)
FatalErrorInFunction
<< "Operation " << operationTypeNames_[operation_]
<< " not available for values of type "
<< pTraits<Type>::typeName
@ -393,14 +367,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::filterField
}
else
{
FatalErrorIn
(
"fieldValues::faceSource::filterField"
"("
"const GeometricField<Type, fvPatchField, volMesh>&, "
"const bool"
") const"
) << type() << " " << name_ << ": "
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
<< nl
<< " Unable to process internal faces for volume field "

View File

@ -92,16 +92,8 @@ Foam::fieldValue::fieldValue
}
else
{
WarningIn
(
"fieldValue::fieldValue"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name << nl
<< endl;
active_ = false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,16 +48,8 @@ Foam::autoPtr<Foam::fieldValue> Foam::fieldValue::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"fieldValue::New"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "Unknown " << typeName << " type "
FatalErrorInFunction
<< "Unknown " << typeName << " type "
<< modelType << nl << nl
<< "Valid " << typeName << " types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -67,14 +67,7 @@ Type Foam::fieldValues::fieldValueDelta::applyOperation
}
default:
{
FatalErrorIn
(
"Type Foam::fieldValues::fieldValueDelta::applyOperation"
"("
"const Type&, "
"const Type&"
") const"
)
FatalErrorInFunction
<< "Unable to process operation "
<< operationTypeNames_[operation_]
<< abort(FatalError);