STYLE: Updated messages to use pretty macros

This commit is contained in:
Andrew Heather
2017-06-23 12:23:04 +01:00
parent 34a1a5dec2
commit fef4e493d4
4 changed files with 16 additions and 89 deletions

View File

@ -80,16 +80,8 @@ Foam::oversetFvPatchField<Type>::oversetFvPatchField
{ {
if (!isA<oversetFvPatch>(p)) if (!isA<oversetFvPatch>(p))
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << " patch type '" << p.type()
"oversetFvPatchField<Type>::oversetFvPatchField"
"("
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const dictionary&"
")",
dict
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'" << "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name() << "\n for patch " << p.name()
<< " of field " << this->internalField().name() << " of field " << this->internalField().name()

View File

@ -108,19 +108,8 @@ void Foam::setRefCells
if (refCells.size() != regionNeedReference.size()) if (refCells.size() != regionNeedReference.size())
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Number of refCells " << refCells.size()
"setRefCell\n"
"(\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" labelList&,\n"
" scalarField&,\n"
" const bool\n"
")\n",
dict
) << "Number of refCells " << refCells.size()
<< " does not correspond to number of regions " << " does not correspond to number of regions "
<< regionNeedReference.size() << regionNeedReference.size()
<< exit(FatalIOError); << exit(FatalIOError);
@ -146,19 +135,8 @@ void Foam::setRefCells
&& regionRefCells[regionI] == -1 && regionRefCells[regionI] == -1
) )
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Have no reference cell for region " << regionI
"setRefCell\n"
"(\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" labelList&,\n"
" scalarField&,\n"
" const bool\n"
")\n",
dict
) << "Have no reference cell for region " << regionI
<< nl << nl
<< "Overall per-region reference cells " << "Overall per-region reference cells "
<< regionRefCells << regionRefCells
@ -173,19 +151,8 @@ void Foam::setRefCells
if (refPoints.size() != regionNeedReference.size()) if (refPoints.size() != regionNeedReference.size())
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Number of refPoints " << refPoints.size()
"setRefCell\n"
"(\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" labelList&,\n"
" scalarField&,\n"
" const bool\n"
")\n",
dict
) << "Number of refPoints " << refPoints.size()
<< " does not correspond to number of regions " << " does not correspond to number of regions "
<< regionNeedReference.size() << regionNeedReference.size()
<< exit(FatalIOError); << exit(FatalIOError);
@ -226,19 +193,8 @@ void Foam::setRefCells
{ {
if (hasRef[regionI] != 1) if (hasRef[regionI] != 1)
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Unable to set reference cell for field " << field.name()
"setRefCell\n"
"(\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" labelList&,\n"
" scalarField&,\n"
" const bool\n"
")\n",
dict
) << "Unable to set reference cell for field " << field.name()
<< nl << nl
<< " Reference points " << refPointName << " Reference points " << refPointName
<< " " << refPoints << " " << refPoints
@ -251,19 +207,8 @@ void Foam::setRefCells
} }
else else
{ {
FatalIOErrorIn FatalIOErrorInFunction(dict)
( << "Unable to set reference cell for field " << field.name()
"setRefCell\n"
"(\n"
" const volScalarField&,\n"
" const volScalarField&,\n"
" const dictionary&,\n"
" labelList&,\n"
" scalarField&,\n"
" const bool\n"
")\n",
dict
) << "Unable to set reference cell for field " << field.name()
<< nl << nl
<< " Please supply either " << refCellName << " Please supply either " << refCellName
<< " or " << refPointName << nl << exit(FatalIOError); << " or " << refPointName << nl << exit(FatalIOError);

View File

@ -42,10 +42,8 @@ Foam::autoPtr<Foam::windowModel> Foam::windowModel::New
if (!cstrIter.found()) if (!cstrIter.found())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown windowModel type "
"windowModel::New(const dictionary&, const label)"
) << "Unknown windowModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid windowModel types are:" << nl << "Valid windowModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()

View File

@ -159,11 +159,7 @@ void Foam::fileFormats::FLMAsurfaceFormat<Face>::write
{ {
if (!os.good()) if (!os.good())
{ {
FatalErrorIn FatalErrorInFunction
(
"fileFormats::FLMAsurfaceFormat::write"
"(OSstream&, const MeshedSurfaceProxy<Face>&)"
)
<< "bad output state " << "bad output state "
<< exit(FatalError); << exit(FatalError);
} }
@ -352,11 +348,7 @@ void Foam::fileFormats::FLMAsurfaceFormat<Face>::write
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
(
"fileFormats::FLMAsurfaceFormat::write"
"(const fileName&, const MeshedSurfaceProxy<Face>&)"
)
<< "Cannot open file for writing " << filename << "Cannot open file for writing " << filename
<< exit(FatalError); << exit(FatalError);
} }